Copyright: Copyright 1996 Symantec
Citation: Reprint permission by Symantec, Visual Cafe 1996


Debugging Your Program

Debugging in Visual Café involves the following activities:

Correcting source errors

Debugging specific code threads

Viewing and modifying variables

Viewing the call stack of executing methods

Setting a run-time watch on program variables

Tracking and setting breakpoints


Using the Source Window
Using the Source Editor

The Source Editor is the primary debugging view: it is where you see your code at its current point of execution. When you debug your program, Visual Café automatically opens the Source Editor containing the current line of code.

When you are in debug mode, the Source Editor view provides extra functionality allowing you to manipulate breakpoints and specify variables to watch in the Watch window.


Managing Breakpoints

Visual Café provides many ways to manage breakpoints, allowing you to stop execution of a program at a specific location or on a predetermined condition such as a variable attaining a particular value.

Breakpoints are manipulated from within the Breakpoints window which shows all breakpoints currently defined in your program. You can view or modify the different parameters of any breakpoint and enable or disable the currently defined breakpoint.

Breakpoints are saved with the source and are made visible each time you open the project. The state of each breakpoint--enabled or disabled--is also saved with the project.


Viewing and Modifying Variables

In Visual Café, you can examine any of the variables in your program while in debug mode.

Your program’s variables are displayed in the Variables window which displays local variables, global variables, and objects that are local to the current method. You can examine objects and array data elements as well as simple data types.

When you pause the execution of your program, you can modify the value of a variable and then continue execution with the new value in place.

You can modify the value of a variable from either the Variables window or the Watch window.


Watching Variables and Expressions

In Visual Café, you can specify variables and expressions that you want to watch while debugging your program. The variables that you elect to watch are displayed in the Watch window which is only available when you pause a running program.

You can also modify the value of a variable using the Watch window.


Viewing the Call Stack

When debugging in Visual Café, you can view the stack of methods in your application that have started but not completed. These pending methods are displayed in the Call Stack window.

The currently executing method appears at the top of the stack and older function calls below that. You can also see the parameter types and values for each method on the call stack.


Debugging Threads

When debugging a multithreaded program in Visual Café, you can select a single thread to work on in exclusion of any others. All the extant threads your program has created are displayed in the Thread window along with the state of each thread.

You can switch between threads to debug or view the source for a selected thread from the Thread window. You can also update the Call Stack window with a single thread’s call chain and update the Variables window to show only the variables within the current thread.


Setting Breakpoints

You can set breakpoints anywhere in your code in order to stop execution at a particular line and regain control after starting your program. When your program breaks on a breakpoint you can examine variable values, single step your program, or examine the state of your program in any way you want.

In Visual Café, you can set a breakpoint:

•	On the current line in the Source Editor

•	On a specific line number

•	On a method name

•	On the condition of a variable or expression


Setting a Breakpoint

You set a breakpoint directly to a line of source code in the Source Editor.

1.	Click on the line where your breakpoint is to be set.

2.	Choose Set Breakpoint from the Source menu.

The breakpoint is set, indicated by a stop symbol in the left margin next to the line of code.


Clearing a Breakpoint

Clearing a breakpoint deletes it from the set of breakpoints you have defined. This is distinct from disabling a breakpoint which retains it in your breakpoint list in a temporarily disabled state.

You clear a breakpoint either at a source line (in the Source Editor ), or from the list maintained in the Breakpoints window.

To clear a breakpoint at a line of source code

1.	Select the breakpoint by clicking in the line where your breakpoint is set (the breakpoint is denoted with a stop symbol in the left margin).

2.	Choose Source [image] Set Breakpoint.

To clear a breakpoint from the Breakpoints window

•	Select one or more breakpoints in the list and press DELETE.

When the breakpoint is cleared, the stop symbol is removed from the left margin of the line of source code.


Toggling a Breakpoint

Toggling a breakpoint is a quick way to reverse the state of a breakpoint on any line of source code in the Source Editor.

1.	Click on the line where you want to toggle the breakpoint.

2.	Click on [image] (Toggle Breakpoint) in the Debug Toolbar,

If the breakpoint is set, a stop symbol appears in the left margin next to the line of code; if it is reset, the stop symbol is cleared.


Setting a Conditional Breakpoint

A conditional breakpoint pauses the execution of your application when a specified condition is met. In Visual Café, when you set a conditional breakpoint, it is added to the breakpoint list in the Breakpoints window along with the condition you specify.

1.	In the source code window, click on the line where the breakpoint should occur.

2.	Choose Source [image] Set Conditional Breakpoint.

3.	Click When expression is true.

4.	Type your breakpoint condition into the text box.

5.	Click Add.

The breakpoint is added to the list in the Breakpoints window.

6.	Click Close.


Modifying a Conditional Breakpoint

You modify a conditional breakpoint by changing the breakpoint conditions of the breakpoint in the Breakpoints window.

1.	Choose Breakpoint from the Window menu to display the Breakpoints window.

2.	Click on the Condition field of the breakpoint you want to change.

3.	Type the new condition into the Condition field.

If necessary, Visual Café prompts for clarification, for example, it a method name entered is an overloaded method.

4.	Press ENTER to save the change.


Stopping a Program

You can completely stop a program (as opposed to pausing temporarily). Stopping a program terminates it completely in order to work further on it. Execution of a stopped program cannot be resumed.

•	Choose Run [image] Stop


Restarting a Program

Restarting a program is when you start execution over again from the beginning. This is different from resuming a program where you restart execution after a breakpoint.

•	Select Run [image] Restart


Pausing a Program

In Visual Café, you can pause a running program and switch to debug mode. The effect on your program is the same as if a breakpoint is hit.

•	Choose Run [image] Pause

Note  When an unhandled exception is encountered, the program pauses automatically at the line where the error occurred.


Resuming a Program

You can resume execution when your program is paused because of a breakpoint, an exception, or because you manually paused execution. When you resume your program, execution is continued from the current location:

•	Select Run [image] Resume


Handing Control to Your Program

When you run your program, you hand control over to it and interact with it as a user.

In Visual Café, you can choose to run your program in one of four ways. You can run your program:

•	until it terminates normally or reaches a breakpoint or an exception

•	until execution reaches the cursor location in the Source Editor

•	so it pauses as it is about to execute the first line

•	from its current debug point until it terminates, ignoring any breakpoints that are set


Running your Program

When your code is in place, you will want to run your program until it reaches normal termination or encounters a breakpoint.

•	Choose Run [image] Run


Running to the Cursor Location

You can run your program until execution reaches the cursor location, and then pause. This is a handy way to resume from a prior breakpoint to a point you are inspecting in the Source Editor.

•	Choose Run [image] Go Until Line

Note  If the selected line does not get executed before the end of the program, your program will not pause.


Running to First Line

Visual Café lets you run your program and pause just before executing the first line. This puts you in debug mode before anything has been done to your program’s state.

•	Choose Run [image] Run to First Line


Running to Program End

You can run your program from its current point until the end, ignoring any breakpoints that are set. This allows you to check for any suspected exception conditions.

•	Choose Run [image] Run to End

Note  If any kind of exception occurs, the program will break at the point of the violation.


Correcting your Source Code

If there are syntax errors in your source code, Visual Café flags them in the Messages window after a compile. You can easily navigate to each error directly from the Messages window.

1.	Choose Window [image] Messages to bring the Messages window to the front.

2.	Double-click on any error message to go to the error reported.

The file containing the error will be opened at the offending line into a Source Editor from where you can work on your source code.


Enabling or Disabling a Breakpoint

The checkbox preceding each breakpoint in the Breakpoints window indicates whether or not that breakpoint is enabled. When checked, the breakpoint is enabled.

You can enable or disable a breakpoint by clicking on the breakpoint’s checkbox, or by pressing the spacebar.

To enable a breakpoint

Find the breakpoint in the list and click the empty check box corresponding to that breakpoint.  When the box is checked the breakpoint is enabled.

To disable a breakpoint

Find the breakpoint in the list and click the checked box corresponding to that breakpoint.  When the box is empty the breakpoint is disabled.

Using the spacebar

You can press the SPACEBAR to toggle the state of a selected breakpoint in the Breakpoints window.

Note  Disabling a breakpoint does not delete it from the breakpoint list.


Setting a Breakpoint on a Variable or Expression

You can have your program break whenever a variable reaches a specific value or an expression of your choice becomes true.

1.	Choose Source [image] Set Conditional Breakpoint from the Source Menu

2.	Into the Break panel, click on When expression is true.

3.	Enter a Boolean expression into the text box.

4.	Click Add.

The breakpoint added to the list in the Breakpoints window.

5.	Click Close.


Setting a Breakpoint on a Method Name

You can have your program break every time a specific method is executed by setting a breakpoint on a method name.

1.	Choose Source [image] Set Conditional Breakpoint

2.	Into the Break at panel, click on Method name.

3.	Enter a Method name into the text box.

4.	Click Add.

The breakpoint added to the list in the Breakpoints window.

5.	Click Close.


Setting a Breakpoint on a Line Number

You can have your program break every time a specific line within your current source file is about to be executed.

1.	Choose Source [image] Set Conditional Breakpoint

2.	Into the Break at panel, click on Line number.

3.	Enter a Line number into the text box.

4.	Click Add.

The breakpoint added to the list in the Breakpoints window.

5.	Click Close.


Stepping Code After a Breakpoint

After your program has hit a breakpoint, you can step through your lines of code one at a time using three techniques.

Step In

Steps in to the next line of source code. If the program is running and you are paused in the program, this command steps to the next source code statement.

Step Over

Steps over the current method and stops when the method returns. Executes the program to the next statement (unless a breakpoint or an exception is encountered before execution reaches that point). If the current statement is a method call, the program executes to the next statement following the call.

Step Out

This command executes to the current function's return address (unless a breakpoint or an exception is encountered before execution reaches that point).


Stepping into a Method

After your code has hit a breakpoint, you can choose to single step by stepping into any method call contained in the next line to be executed. This causes the single step to land at the first line of the called method.

To step into a method:

•	Choose Run [image] Step Into

Note  If the next line to be executed does not contain a method call, this simply performs a single step of the line.


Stepping over a Method

You can step over a method call contained in the next line to be executed after your code has hit a breakpoint. This causes the single step to execute the called method in its entirety and land on the next line of code in your source.

To step over a method:

•	Choose Run [image]  Step Over

Note  If the next line to be executed does not contain a method call, this simply performs a single step of the line.


Stepping out of a Method

If you hit a breakpoint in a method and want to execute the rest of that method returning to the caller, you can choose to step out of the currently executing method.

To step out of a method:

•	Choose Run [image] Step Out


Viewing Source for a Breakpoint

In Visual Café, you can select any of the breakpoints listed in the Breakpoints window and view the source code associated with that breakpoint.

1.	Choose Windows [image] Breakpoints to display the Breakpoints window.

2.	Click on the breakpoint for which you want to see the source code.

3.	Choose the Breakpoint  [image] Go to Source

The focus in the Source Editor will be set to the specified breakpoint.


Ignoring Breakpoints

There’s a straightforward way in Visual Café to ignore all breakpoints you have set without changing the state of any of the breakpoints in the Breakpoints window. You do this by running to the program end, or running to the cursor location in the current source window.

Running to program end

This ignores breakpoints and run the program to termination.

Running to the cursor location

This ignores breakpoints until execution hits the current line at which point execution pauses.


Debugging Remotely

Visual Café allows you to run a program on one machine and debug it remotely on another. To do this, Visual Café and the class files and HTML files need to be located on the remote machine.

Both the local and the remote machine need to have TCP/IP installed and working properly.


Starting Remote Applet/Application Debugging

To start remote applet or application debugging:

1.	Open a console session on the remote machine by moving to the directory containing the class and HTML files of the program you intend to debug and executing caferemote.

Caferemote displays some version information, and then an agent password and the machine's IP address.

2.	Click OK.

Remote debugging is now enabled.

3.	On the machine that is running the debugger, load the project corresponding to the class and HTML files you are debugging on the remote host machine.

4.	Choose the Project  [image] Options... and select the Debugger tab.

5.	Check Enable Remote Debugging and enter the Host Address and Agent Password as reported by caferemote.

6.	Click OK.


Ending Remote Applet/Application Debugging

To end remote debugging:

•	On the remote machine, select the Caferemote console window and type "Ctrl-C".

This terminates the debug session currently in process.

To continue, you need to re-execute caferemote in order to get a new agent password.


Viewing the Value of a Variable

You can view a variable by selecting its name from the Variables window.

1.	Choose Window [image] Variables

The Variables window opens, displaying all the variables in the current context of the program.

2.	Click on the variable you want to view.

3.	To expand an object to see its contents, click the plus sign to the left of the object you want to expand.


Modifying a Variable in the Variables Window

You can modify a variable by selecting its name from the Variables window and typing a value into the value column.

1.	Choose Window [image] Variables

The Variables window opens, displaying all the variables in the current context of the program.

2.	Click on the variable you want to change.

3.	Click in the Value column.

4.	Type the new value in the Value box.

5.	Press ENTER to save the change.

Note  To modify the value of an array or any structured type, edit the individual fields or elements. You cannot edit an entire array or structure at once.


Viewing Type Information for a Variable

You can view a variable’s type from the Variables window.

1.	Choose Window [image] Variables

The Variables window opens, displaying all the variables in the current context of the program.

2.	Click on the variable whose type you want to view.

The variable’s type is shown in the Type column.


Watching a Variable or Expression

You can watch a variable or expression while debugging by adding the variable name to the Watch window. There are two ways to do this; directly from the Watch window, or from the Variables window.

From the Watch Window

1.	Choose Window  [image] Watch to display the Watch window.

2.	Type a variable name or an expression directly into the Watch field of the Watch window.

From the Variables Window

1	Right click on the variable you want to watch.

2	Choose Watch Variable from the context menu.

The Watch window evaluates and immediately displays the value of the variable or expression.

Note  If the variable is an object or a pointer to an object, the Watch window automatically expands the variable to show the most important data at the top level.


Modifying a Variable or Expression in the Watch Window

You can change the variable name or expression you elected to watch at run time directly from the Watch window. The Watch window can also be used for modifying variables in place while your program is in debug mode.

1.	Choose Window  [image] Watch

All the variables and expressions you have chosen to watch are displayed in the Watch window.

2.	Click on the variable or expression you want to change.

To change the value of a variable

3.	Click in the Value column.

4.	Type the new value in the Value box.

To change the variable or expression to watch

5.	Click in the Watch field.

6.	Edit the variable or expression.

7.	Press ENTER to save the change.

Note  To modify the value of an array or any structured type, edit the individual fields or elements. You cannot edit an entire array or structure at once.


Deleting a Variable or Expression from the Watch Window

When you’ve finished watching a run-time variable or expression, you can delete it directly from the Watch window.

1.	Choose Window  [image] Watch

All the variables and expressions you have chosen to watch are displayed in the Watch window.

2.	Click on the variable or expression you want to delete from the list.

3.	Type DELETE.

The selected entry is deleted from the Watch window.


Viewing Parameters for a Method on the Call Stack

You can view the parameters passed to a method on the call stack when that method was called. Visual Café allows the display of both values and types for each parameter passed.

1.	Choose Window  [image] Call Stack from the Window menu to display the Call Stack window.

To view parameter types

2.	Choose Call  [image] View Parameter Types

This toggles the display of parameter types in the Procedure column of the Call Stack Window.

To view parameter values

3.	Choose Call  [image] View Parameter Values

This toggles the display of parameter values in the Procedure column of the Call Stack Window.


Viewing Variables for a Method on the Call Stack

You can view the values of variables for any method on the call stack. Only the variables in scope at the time the method entered the stack can be viewed.

1.	Choose Window  [image] Call Stack to display the Call Stack window.

2.	Click on the Method whose variables you want to view.

3.	Choose Call [image] Go to Variables

This opens the Variables window that lists the variables in the selected call.


Viewing Source for a Method on the Call Stack

Visual Café allows you to choose any method entered on the call stack and view the source code for that method.

1.	Choose Window [image] Call Stack to display the Call Stack window.

2.	Click on the Method whose code you want to view.

3.	Choose Call [image] Go to Source

This opens the Source Editor for the selected call.


Viewing Source for a Selected Thread

If you want to look at the source code for a specific thread, you can do so from the Thread window.

1.	Choose Window [image] Thread to display the Thread window.

2.	Click the thread you want to focus on.

3.	Choose Thread [image] Set Focus

Set Focus updates the Source Editor.

4.	Display the Source Editor.

The thread’s source code is visible in the Source Editor.


Viewing the Active Variables in a Thread

You can view the values of variables for any thread currently executing.

1.	Choose Window [image] Thread to display the Thread window.

2.	Click the thread you want to focus on.

3.	Choose Thread [image] Set Focus

Set Focus updates the Variables window.

4.	Choose Window [image] Variables

The Variables window opens displaying the chosen thread’s variables.


Viewing the Call Stack for a Thread

If you’re working on a specific thread and want to see the call stack for that thread alone, Visual Café allows you to do so.

1.	Choose Window [image] Thread to display the Thread window.

2.	Click the thread whose call stack you want to view.

3.	Choose Thread [image] Set Focus

Set Focus updates the Call Stack window.

4.	Choose Window [image] Call Stack

The Call Stack window opens on the thread you selected.

5.	Click on the Method whose code you want to view


Debugging a Single Thread

If you want to focus your debugging efforts on a specific thread to eliminate the behavior of others you can set the focus to that thread and work on it alone.

1.	Choose Window [image] Thread to display the Thread window.

2.	Click the thread you want to work on.

3.	Choose Thread [image] Set Focus

This sets the focus of the debugger to the selected thread.

4.	Continue debugging that thread in the Call Stack window, Variables window, or Source windows.


Suspending a Thread

If you’re working on a multithreaded program, you can suspend any specific thread if you suspect it of causing unwanted side effects while your program is running or while you are debugging.

1.	Choose Window [image] Thread to display the Thread window.

2.	Click the thread you want to suspend.

3.	Choose the Thread [image] Suspend

The selected thread is suspended.


Resuming a Suspended Thread

If you’ve suspended any threads to temporarily eliminate their behavior from your program, you can resume any one you choose from the list displayed in the Thread window.

1.	Choose Window [image] Thread to display the Thread window.

2.	Click the thread you want to resume.

3.	Choose Thread [image] Resume

The selected thread is resumed.


Suspending Other Threads

If you want to focus your debugging attention on a single thread, Visual Café allows you to suspend other threads to narrow down the behavior of your program.

1.	Choose Window [image] Thread to display the Thread window.

2.	Click the thread you want to want to work on.

Note    You’re choosing all other threads than this one to be suspended.

3.	Choose Thread [image] Suspend Others

All other threads in the debugger except the one that is selected are suspended.


Resuming Other Suspended Threads

If you’ve chosen to suspend any threads in a multithreaded program, you can resume all other threads at any time.

1.	Choose Window [image] Thread to display the Thread window.

2.	Click the thread you don’t want to resume.

Note    You’re choosing all other threads than this one to be resumed.

3.	Choose Thread [image] Resume Others

All other threads in the debugger except the one that is selected are resumed.


Handling Exceptions

When running your program, you can choose to have all exceptions break into the debugger, or to have only unhandled exceptions break into the debugger.

1.	Choose Project [image] Options

2.	In the dialog box that appears, click the Debugger tab.

3.	Choose how you want to handle exceptions, and add exceptions to the list.

To have all exceptions break into the debugger

1.	Select the exception in the list.

2.	Click in the Action column.

3.	Click the down-arrow button and choose Stop Always.

To have only unhandled exceptions break into the debugger

1.	Select the exception in the list.

2.	Click in the Action column.

3.	Click the down-arrow button and choose Stop If Not Handled.

Note  If you want to set all the exceptions in the list to stop only if they are unhandled exceptions, click Reset.


Top of file

This is the first topic in the Editors help file

Overview  window


TBD


AAA - Stuff to edit
AAA - Stuff to edit or add

Drag applet to java code?

Renaming a form from the Property List


Overview Section
Intro/Marketing Section


Welcome to Visual Café

Symantec Visual Café is the first visual RAD tool designed exclusively for the Java programming language. Visual Café is a complete form-centric development environment that provides the tools and components necessary to develop, debug, and deploy high-performance Web applets and stand-alone Java applications.

Visual Café provides you with a rich set of WYSIWYG tools that you use to assemble and debug your applets and applications.

When developing an applet or application, the main object that you work with in Visual Café is a project. A project contains all objects that you need to accomplish your task. Project objects include HTML files, forms, and the database. Forms are containers for components that allow your user to interact with your program. Examples of forms are applets, windows, and dialogs.

With Visual Café, you can

•	assemble an applet

•	assemble an application

•	convert an applet to an application


About Applets vs Applications

So, what is the difference between an applet and an application?

The most common Java programs are applications and applets. Applications are standalone programs, such as the HotJava browser. Applets are similar to applications, but they don't run standalone. Instead, applets adhere to a set of conventions that lets them run within a Java-compatible browser.

An applet is an interactive Java program that is embedded in a web page on a HTTP server.

An application is Java program that runs with a Java virtual machine (Java VM) that is installed on the client system. Applications typically consist of one or more forms or applets, including the components on that form, and programming which add functionality to the forms and components on the form.

The differences between applets and applications occur in these area:

•	starting

•	where it runs

•	usage of a Web browser

•	Java requirements

•	look and feel

•	access to the client’s hard disk


Starting

Applet	Application
Starts when the user opens the web page that contains the applet with a Java-enabled Web browser.	The user install the application on the local hard disk and executes the application directly.


Where it Runs

Applet	Application
Runs unmodified within the client area of the user’s Web browser.	Runs within the Desktop environment.


Usage of a Web Browser

Applet	Application
Yes. The Web browser must contain a Java VM in its architecture or by way of a plug-in.	No.


Java Requirements

Applet	Application
No. An applet contains everything that it needs to run on the client machine.	Yes. Java must be installed on the client machine. Java can be download from the JavaSoft Web page.


Look and Feel

Applet	Application
Applets adopt the look and feel of the client machine’s operating system native user interface controls.	Applications can create their own frames, title bars, and menus


Access to the Client’s Hard Disk

Applet	Application
The Java VM denies applets the ability to read from or write to a user’s local hard disk.	Can access the local hard disk for reading and writing data and accessing external files.


Applet Ideas

Applets can give your Web page appeal and interactive functionality beyond HTML. Applets provide a simple way of transferring a small secure program to your user's machine.

An applet is a visual object with two elements: a visual interface and Java code for enhanced functionality. The interface to your applet can contain a variety of component, for example, buttons, text boxes, graphics, an animation element, audio clips, timers, and images.

You can enhance the Java code that is automatically created for you while designing the applet interface to add additional functionality to the applet. For example, you could write code to incorporate a graphic filter for an image that you want to use but which is in a format that is not supported by most Web browsers.

Another reason to create applets is to relieve the workload on your Web server. Each applet is download to the user's local machine and run locally.


Application Ideas

The power of a Java application is that it runs cross-platform, making development and maintenance easier in a large heterogeneous platform environment. That is why Java application are perfect in enterprise Intranet sites.

Applications typically consist of one or more forms and applets, and source code files.


How Visual Café Keeps Work Sync
How Visual Café Keeps Work Synchronized

As you work in the Form Designer, Visual Café generates the Java source code for your forms and components and automatically adds the source code files to your project.

As you modify a object, the underlying Java code is also changed.

Visual Café fully supports “2-way” editing of visual objects. The first direction of editing a visual object is through the Form Designer. The direction is to change the object directly in the source code while in the Source Editor.

When editing the object’s source code directly, any change that you make is interpreted and the change is reflected in the Form Designer.

The power behind Visual Café’s object coding is it source parsing technology. The Visual Café parser reads you Java source code in a background thread as the code is added to your project. This automatic reading results in a symbolic object map in your source code. This map is used by the Class Browser and Hierarchy Editor to allow you navigate and edit your Java classes.

The Visual Café source parser is independent of the compiler and frees you from having to compile your code before obtaining class information. The parser automatically detects changes to your Java source code and refreshes the object information as you save the source changes.


How Visual Café Maintains WYSIWYG

The Visual Café Form Designer uses an integrated Java virtual machine (Java VM) to run Java code at design time. Therefore, the Form Designer provides a true WYSIWYG design environment.

The design environment gives you an accurate representation of complex layouts by using the various Java Layout Managers.

And, the Form Designer runs the Java components and applets at design time so that you can see the affect of any animation on your form layout.


Overview Section


Visual Café Tools

Visual Café provides several tools to help you create forms. With Visual Café, you add visual objects to your forms to assemble applets and applications.

Each visual object has a set of properties, a visual element, a set of methods and associated Java code, and may have one or more interactions. Each of these object attributes has its own tool to help you quickly define and create the objects.

The main Visual Café tools are

•	Visual Café Window

•	Project Window

•	Form Designer

•	Palette

•	Menu Editor

•	Interaction Wizard

•	Property List

•	Source Editor

•	Component Library

•	Class Browser

•	Hierarchy Editor

•	Visual Debugger


Visual Café File Extensions

During the development of your applets and applications, Visual Café creates several files. The following are the common extensions with the files purpose.

.ve

.ve2

.html

An HTML file

.java

A component’s Java source file.

.vpj

A Visual Environment Project.


Development Environment Customization

You can customize the Visual Café development environment by

Setting global options in the Environment Options dialog

Selecting project specific options


Visual Café Workspaces

A large number of views are available in the Vector Café environment. Visual Café lets you save a configuration of windows as an unique workspace.

A workspace provides a convenient way to switch from one screen layout to another. Workspaces are task-oriented. You create workspaces for different tasks, such as editing or debugging. You access workspaces from the Workspace menu.

Visual Café supplies you with two workspaces; edit and debug. The Debug workspace loads when you run your application. This allows you to work debugging views and when the application ends, you return to the Edit view.

You can create, delete, or rename workspaces, if needed. Only global view windows are saved in a workspace.

The state of non-global windows remain independent of application mode. The state, size, and position of non-global windows is saved dynamically and restored when you close and open the project again.

Workspaces can be automatically loaded while running a project , when you stop the project, and when you are editing forms.

Workspaces are saved dynamically. For example, if the Property List window is saved in the Edit workspace and you close that window while the Edit workspace is loaded, the change is permanently saved. This feature ensures that as you are running and stopping your programs. Window states remain as you last left them.


Visual Café Projects

A project is the primary component of Visual Café.

Projects speed development by letting you recompile only the source files that have changed, or whose header files have changed, since the last time the project was built. Visual Café manages the project for you by automatically analyzing the dependencies of the source files and updating the project information each time you build the project.

A project is a collection of forms and HTML pages used to generate a single executable. Forms are containers for components, such as, static text, list boxes, menu bars, graphics, scrollbar, and buttons. In addition to these standard Java class components, Visual Café also provides you with many other components. All Visual Café components are organized in the Visual Café Component Library.

Applets, windows, and dialogs are examples of forms. Each form is saved to disk in individual file.

Each object in the project is made up of two elements:

•	visual element

•	class element (Java code)

You can create projects that do not contain any visual elements, such as a Java component.

When you run Visual Café a new project is automatically created using the default project template. Initially, the default template is the Basic Applet template.

The active project is visually depicted in the Project Window.

You can open multiple projects simultaneously. When subsequent projects are opened, only the project's Project Window displays.

You can customize a project by project options such as project and release type, runtime arguments, compiler and interpreter setting, and search directories.


About Component Properties

All visual objects are comprised of a set of properties that define the object's look and behavior. Each visual object has its own set of properties.

Visual Café provides a Property List from which you can directly modify an object's properties.

When you use the Form Designer to change the look-and-feel of a component and its label, the visual property changes are automatically stored and immediately reflected in an open Property List.

This is a list of component properties, their definition, and valid values:


Working with Templates

You may want to create custom template for the different applets and applications that you develop. The templates can contain the objects and component commonly used in the project. Examples of special purpose templates are

•	Web sites

•	single document

•	database

•	logon applet

Describe the default template and what is in them

•	Basic Application

•	Applet

•	?????


Java coding Backgroud info
Java coding Background info

In the Java language, all methods (functions) and variables exist within a class or an object (an instance of a class). The Java language does not support global functions or stray variables. Thus, the skeleton of any Java program is a class definition.

A class--the basic building block of an object-oriented language such as Java--is a template that describes the data and behavior associated with instances of that class. When you instantiate a class you create an object that looks and feels like other instances of the same class. The data associated with a class or object is stored in variables; the behavior associated with a class or object is implemented with methods. Methods are similar to the functions or procedures in procedural languages such as C.

Importing Classes and Packages

The code above starts off with two import statements. By importing classes or packages, a class can more easily refer to classes in other packages. In the Java language, packages are used to group classes, similar to the way libraries are used to group C functions.

Defining an Applet Subclass

Every applet must define a subclass of the Applet class. In the "Hello World" applet, this subclass is called HelloWorld. Applets inherit a great deal of functionality from the Applet class, ranging from communication with the browser to the ability to present a graphical user interface (GUI).

Implementing Applet Methods

The HelloWorld applet implements just one method, the paint() method. Every applet must implement at least one of the following methods: init(), start(), or paint(). Unlike Java applications, applets do not need to implement a main() method.


Drag-and-Drop Behavior

You can use standard GUI techniques for the dragging and dropping of objects into and among other objects.

Visual Café has unique drag-and-drop behavior in these areas:

•	Project Window

•	Property List

•	Source Editor

•	Views toolbar


In the Source Editor

Dragging	Into	Effect
Code	Windows	Creates a .src file containing the selected text.
Code	Event prototype in the Editing pane	Moves just the event code into the new event.
Event or method item	Editing pane	Inserts Java code to call the event and enters the method name in the new event prototype.


In the Views toolbar

Dragging	Into	Effect
Icon	Desktop	Opens the tool at the drop point.


In the Property List

Dragging	Into	Effect
Property	Source Editor Editing pane
Property	Project window	Adds a column in the Project window for the property. Each object that contains that property displays a value.
Property	Component or form	Changes the property value of the target object to match the "dragged" property value.  This actions is only valid when the target object contains the property


In the Project window

Dragging	Into	Effect
A form, class, or	Project window	Moves the object.
Component	A different Project window	Copies object to the new project.
	Form object in the Project window	Copies object into the form object and opens the Form Designer.


Understanding Component Interactions

One of the most powerful features of Visual Café is the ability to effortlessly build a relationship between two components. This relationship is called an interaction.

A interaction can imply either an event notification or data transmission depending on the component types involved in the interaction.

As you connect the components, Visual Café automatically generates code for the relationship. Therefore, you can assemble interactive applets and applications without ever having to write code.

The key elements of a interaction are the trigger event and the action. The trigger event is the originator of the interaction. It determines when the interaction happens or when to execute some code based on a condition. The action component is the component on which "action" happens. The action specifies what to do when a condition is met.

For example, you can connect a button (the trigger component) to a text box (the action component) so that when the user clicks on the button (the trigger event) the associated text box is enabled for data input (the action).

Conditions can be added to a interaction similar to an If statement in code.

Connection logic evaluates the state or condition of the action component, then sets a property, calls a function, or executes user-defined code.


Using Layout Managers

Java provides automatic layouts that help you arrange components inside a container so that the form has the same look across platforms, browsers, and resolutions.

Visual Café provides you with these layouts:

BorderLayout

Arranges the components in a north, south, east, west orientation.

CardLayout

Arranges the components on several cards. Only one card is visible at a time. This allows you to flip through the cards.

FlowLayout

Arranges buttons from left to right until there is no more room. Each button line is centered.


Types of Java Classes

With Visual Café, you can add classes to a component. There are three types of classes that you can create:

•	Derived

•	Sibling

•	Top


Overview Section
Procedures Section


Overview of Applet Assembly Steps

An applet can add dynamic, interactive functionality to your Web page. Visual Café makes it extremely easy for you to develop an applet.

1.	Create a project with an applet template

 Details on this step

2.	Create the applet's interface in the Form Designer

 Details on this step

3.	Enhance Java source code
Because of Visual Café extensive Component Library, many exciting applets can be create without writing a single word of Java

Details on this step -

4.	Test run the applet in Visual Café

 Details on this step

5.	Add the applet to your HTML page

 Details on this step

6.	Test run the HTML page on your local machine, then across the Intranet or Internet

Details on this step


Overview of Application Assembly Steps

Visual Café provide powerful tools for assembling an application quickly. With Visual Café, your development cycle consists of these steps:

1.	Create a new project with the Basic Application template, Save As

 Details on this step

2. 	Add objects to the project.

 Details on this step

3.	Add objects to forms as needed.

 Details on this step

4.	Enhance Java source code
 	Because of Visual Café extensive Component Library, many exciting applets can be create without writing a single word of Java

Details on this step

4.	Test run the application in Visual Café

Details on this step


Adding a Dialog

To add dialogs to applet and application forms:

1.	Add a dialog object to the project.

 Details on this step

2.	Connect the dialog to a trigger component

 Details on this step


Adding a Menu to a Form

To add menu bars to a form:

1. 	Choose Insert [image] Object

or

Choose Window [image] Component Library

2.	Select Menu Bar from the listing

3.	Click OK on the Insert Object dialog, or drag the Menu Bar icon from the Component Library to the form.

4.	In the Project Window, double-click on the menu bar item to start the Menu Editor

5.	More steps TBD

Define the menus. Each menu is a subcomponent of the menu bar.


Adding a Subclass

To quickly create a new class that extends a selected class, the parent class, or a developer-defined class (extensions of java.lang.Object), use one of these methods:

•	from the Class Browser

•	from the Hierarchy Editor

•	from the Project Window


Adding a Subclass from the Class Browser

To add a subclass:

1.	Right-click in the Classes box

2. 	From the pop-up menu, select the appropriate option to create a derived, sibling, or top class

3. 	In dialog, enter class name, OK. Name appears in classes pane, source pane shows the class declaration


Adding a Subclass from the Hierarchy Editor

You can add a new subclass to an existing class from within the Hierarchy Editor.

To add a derived subclass

1. 	Click the class that you want to be the parent

2. 	Drag and release in any whitespace of the window background

3.	In the Create Derived Class dialog, enter name

4. 	Change source name if needed, enter name in the Source File box or click Browse to find a saved source file

5. 	OK

To add one of three subclass types

1. 	Right mouse click the class that you want to be the parent

2.	From the popup menu, select the appropriate option to create a derived, sibling, or top class.

3. 	In dialog, enter class name, OK. Name appears in classes pane, source pane shows the class declaration


Adding a Subclass from the Project window

To add classes to an existing packages from within the Project Window:

1. 	In Project window, click Packages tab

2.	Select the package that you want the class added to

2..	Choose Insert [image] Class

3. 	In the Insert Class/Interface Dialog, enter name of class

4.	Select a base class from the Extend Class list

5.	Select the access type

6.	If you want the new class to implement one or more interfaces, click the Interfaces tab and select one or more interfaces

7. 	Click Method tab to select one or more methods for the new class.

8. 	OK.

The Source Editor opens and shows the class declaration.


Adding an Applet to an HTML page

After assembling your applet and testing it in Visual Café, you are ready to add the applet to your HTML page.

Using the <APPLET> tag, you specify (at a minimum) the location of the Applet subclass and the dimensions of the applet's onscreen display area. When a Java-capable browser encounters an <APPLET> tag, it reserves onscreen space for the applet, loads the Applet subclass onto the computer the browser is executing on, and creates an instance of the Applet subclass. Next, the browser calls the applet's init() and start() methods, and the applet is off and running.

The bold lines of the following listing comprise the <APPLET> tag that includes the "Hello World" applet in an HTML page.

<HTML>
<HEAD>
<TITLE> A Simple Program </TITLE>
</HEAD>
<BODY>
Here is the output of my program:
<APPLET CODE="HelloWorld.class" WIDTH=150 HEIGHT=25>
</APPLET>
</BODY>
</HTML>

The above <APPLET> tag specifies that the browser should load the class whose compiled code is in the file named HelloWorld.class. The browser looks for this file in the same directory as the HTML document that contains the tag.

When the browser finds the class file, it loads it over the network, if necessary, onto the computer the browser is running on. The browser then creates an instance of the class. If you include an applet twice in one page, the browser loads the class file once and creates two instances of the class.

The WIDTH and HEIGHT attributes are like the same attributes in an <IMG> tag: They specify the size in pixels of the applet's display area. Most browsers do not let the applet resize itself to be larger or smaller than this display area.


Adding an Event to Component

Event-handler code is automatically added to a component’s source when you add an event to a component.

1.	In the Form Designer, double-click on the component.

The Source Editor starts and displays the component's Java code and available events. Events with associated code are shown in bold.

2. 	In the Source Editor, double click on the event that you want to add to the component.

3.	Add the desired Java code for the event handler.


Adding Code to a Java Source File

To paste code into the Source Editor Editing pane from external files or add new code to your project:

1.	Steps to be completed...TBD


 Adding a new file to the project

HTML file are the most common type of file that you may want to add to a project. Source code file can also be added.

1.	Choose File [image] New…

2.	Select Text, click OK

3. 	In the Source Editor, add appropiate HTML code

4.	Save the file with File [image] Save and Add to Project

5. 	Choose Project [image] Add/Remove Files

6.	Select the file name from the upper pane and click OK.


Adding Files to a Project
Adding Existing Files to a Project

To quickly add Java source files and HTML files to your existing project:

1. 	With the Project Editor active, choose Project [image] Add/Remove Files…

2. 	In the Project Files dialog, select the file(s) that you want to add.

3.	Click on Add or Add All, as appropriate


Adding Objects to the Library
Adding Objects to the Component Library

To Be Written

To add objects to the Component Library, use one of these methods:

•	drag and drop the object from the Windows Explorer

•	use the Insert menu


Adding Objects to the Palette

The Palette contains reusable objects. You can add any object from the Component Library to the Palette and use the object in your applets and applications.

There are several methods that you can use to add objects to the Palette:

•	from the Palette

•	from the Component Library

•	from the Project Window

•	from the Insert menu

•	from the Customize Palette dialog


Adding Palette Objects from the Palette

To add Palette objects directly from the Palette:

1.	Double-click in a blank space on the Palette

or

 	Right-mouse click on the Palette

2.	Choose Customize Palette...

3.	Complete the Customize Palette dialog and save the changes

 Details on this step


Adding Palette Objects from the Object Library
Adding Palette Objects from the Component Library

To add objects to the Palette from the Component Library, use one of these methods:

•	drag the object from the Library and drop on the Palette

•	select the object and use the right mouse popup menu Add to Palette command

•	drag and drop the object within the Palette

Note: dragging and dropping a group from the Component Library creates a tab on the Palette. The tab contains all components in the group.


Adding Palette Objects from the Project Window

While working in the Project Window, you can quickly add objects to your custom Palette.

1.	Select the object

2.	Drag/drop the object onto the Palette or Palette tab


Adding Palette Objects with the Insert Menu

Using the Insert menu, you can quickly add objects to your custom Palette.

1.	Make the Palette tab that you want to add objects to active.

2.	Choose Insert [image] Object

3. 	In the Insert Object dialog, select the object

4.	Click Add

The object is added to the active Palette tab.


Adding Palette Objects from the Custom Palette Dialog

The Custom Palette Dialog provides aneasy interface to help you quickly customize your Palette.

1.	Choose File [image] Environment Options [image] Palette tab

2.	Select an object from the Component Library pane and drag it onto a Palette Group or into the general Palette area.

Dragging an object adds the selected object as a member of the current Palette group. Dropping the object onto another object, adds the selected object as a sibling of the same group.

or

2.	Select a Palette Group in the Palette pane.

3.	Select an object in the Component Library pane.

4. 	Click the Add to Palette button.

The selected object is added as a member of the current Palette group.


Adding Objects to a Project

Visual Café provides several ways to add components, forms, dialogs, menus, and files to your project. When objects are added directly to a form, they are added to the project.

To add objects by using drag and drop

You can drag objects from the following areas:

•	from the Palette into the Project Window or Form Designer

•	from the Component Library into the Project Window or Form Designer

•	an HTML or Java file from the Explorer into the Project Window

To add objects by using the Insert menu

At any time while a project is active, you can use the Insert menu to add objects to your project. As appropriate, the object is added to the object that is currently selected in the Project Window.

To add objects by using the Insert Object dialog

1.	Access the Insert Object dialog

 Details on this step

2.	In the Insert Object dialog, verify that the Add-to object name is correct

4.	Select the new object

5. 	Click Add


Adding Components to a Form

Components provide the user interface to you applet or application.

Note: Double-clicking on a form component opens the Property List for the component or an appropriate editor.

1.	Add the component by using one of these methods:

•	drag the object from the Palette to Project Window

•	use the Insert menu

•	drag the object from the Palette to the Form Designer

•	drag the object from the Component Library to the Form Designer

2.	Size the object

You can use standard Cut/Copy/Paste functionality for selecting and handling objects.

3.	While the component is still selected, you can type in a name for the component. The name should not contain spaces.

4.	Change component properties as needed.

 Details on this step

5. 	Choose File [image] Save to save changes.


Adding Packages to a Project

A package is simply a group of classes. You may want to add packages for better project organization.

1.	 In the Project Window, click the Packages tab

2.	Choose Insert [image] Packages

3.	Rename the package.

4.	Add appropriate classes to the package by dragging and dropping from other packages or adding custom classes.


Adding Thread to a Project

To add a thread to a project:

1.	Choose Insert [image] Threads

The new thread is highlighted in the Project Window.

2.	Edit the thread name.

3.	To add code, double-click on the thread to open the Source Editor

4. 	TBD - remaining steps to be written


Arranging Components on a Form

Visual Café provide layouts to help you in the organization of components on a form.

1.	Open the Property List for the form.

2.	Double-click on the layout property name.

3.	Select an appropriate layout.

The Form Designer immediately reflects the layout by rearranging the components based on the order that you created them.

4.	Rearrange the components in the Form Designer as needed.


Automating Project Backups

You can control whether project files are automatically backed up each time that a Save is performed. You can also specify the location and name of  the backup files.

To automate project backups:

1.	Choose File [image] Environment Options [image] Saving tab

2.	In the Backup Options area, enable Backup file on Save.

Each time that a Save is performed, backups are written.

3.	Select the location and name of the backup files.

Location and Name	Select
Location: same directory as the source project files. Filename: source file name with .BAK extension	Create BAK file
Location: developer defined directory. Filename: same as the source file name.	Copy to directory
4.	If applicable, enter the pathname of the backup directory.


Automating Project Saves

To define if project files are save before the project is run, and if and how often automatic saves should occur:

1.	Choose File [image] Environment Options [image] Saving tab

2. 	In the Save Project area, enable the appropriate options.

To	Enable
Automatically save project files each time the project is run	Always save changes before running
Automatically perform saves during your work	Save automatically
2. 	If appropriate, specify frequency of the automatic saves.


Building a Custom Palette

Visual Café provides a extensive collection of custom and third-party objects that you can quickly add to your forms. These objects include grids and tabbed dialog boxes.

Palette customization includes:

•	creating objects groups

When groups are added to the Palette, they display on the Palette as tabs. Palette tabs can only display horizontally, even when docking the Palette along the side of the workarea.

•	adding objects to the palette

•	deleting objects from the palette

You can add and remove objects on the Palette from the Environment Options dialog box by clicking the Palette tab.

The left outline list box shows all the objects in the active library. All open libraries appear in this list. The right-hand list represents the Palette itself.


Changing an Existing Interaction

To change the properties of an existing component interaction:

1.	steps to be written


Changing Component Properties

Within the Property List you can modify the properties of form components. When multiple components are selected, property changes are applied to all selected components.

1.	Make the appropriate component(s) current.

 Details on this step

2.	Double-click on the appropriate property in the left column.

The right column activates and displays a list of valid values or the text string is made editable. Properties that have the "+" symbol next to their name are multiple value properties. When you edit these properties, either a dialog displays or the individual property list expands.

3.	Make the desired changes.

4.	Press the Enter key or click in another Property List field to save the changes.

Note: Pressing the Esc key cancels any edits


Changing Editor Properties

The behavior of the Vector Café editors can be changed to suit your individual work needs.

Use the Environment Options dialog to change global editor behavior.

The following items can be customized:

Font Style and Size

Sets the appearance of text in Source windows.

Colors

Both foreground a background color for the selected window can be customized. Also you can preset the colors for certain text items. The items for which you can change the color include: breakpoint text, code window text, comment text, current statement text, custom keyword text, error text, identifier text, keyword text, next statement text, and selection text.

Tab to Space Conversion

You can optionally have tab characters automatically converted to spaces as you type. You can also preset the number of spaces used for each tab character.

Automatic Source Formatting

Automatically formats code as it is entered. This setting automatically indents lines of code, and adds closing braces and parentheses.


Changing the Current Component

Within the Property List you can edit another component in the active form by selecting a new component as current.

Any changes that are made are dynamically reflected in the Form Designer if it is open.

To select multiple components, you must select them in the Form Designer by using CTRL-click.


Closing a Project

When a project closes, all forms, class files, and windows associated with the project are closed.

You can close an active project by using one of these methods:

•	Choose File [image] Close

You are prompted to save any unsaved changes. Visual Café remains open so that you can open another project.

•	Choose File [image] Exit

You are prompted to save any unsaved changes. The project and Visual Café Window close.


Creating a Component Interaction

An interaction is created by connecting two components on a form. You can connect components from within the Form Designer and the Project Window.

1.	Select the components that you want to connecting by using one of these methods:

•	Right mouse click on the trigger component and select Add Interaction…

•	Click the Interaction tool icon.

2.	Draw a line from the trigger component to the action component.

.Tip: You can connect objects across the Project Window and Form Designer, for example, you can click the Interaction tool, select a button in the Form Designer, and drag/draw the interaction line to the dialog object in the Project Window.

Tip: At this point, you can press ESCAPE to cancel the interaction, or click on another object

2. 	In the Interaction Wizard, verify that the trigger component name is correct.

3. 	Select the event that activates the interaction.

3.	Verify that the action component name is correct.

4. 	Select an action to invoke when the interaction event occurs.

•	If the action specified takes no parameters, the interaction is finished.

•	If the action specified takes parameters, a second window displays to allow you to fill in those parameters.

5. 	Specify the condition. You have several options

•	A constant or expression can be entered

•	A member variable of the dialog (or whatever object contains the second item being connected) can be chosen. This list is automatically narrowed down to applicable items.

•	You can call an action on another component in the form. This option is only allowed if both components have the same context.


Controlling Position and Visibility

You can control toolbar and Palette position and visibility.

To float a toolbar or Palette

1.	Select the object from the Visual Café Window

2.	Drag the object onto your desktop.

To dock a toolbar or Palette

1.	Select the object in your desktop area

2.	Drag the object onto the Visual Café window.

To hide a toolbar or Palette

1.	Make the object active

2.	Choose Hide from the header bar's right-mouse menu.

or

1.	Right-click within the Visual Café Window and deselect the object's name.

To activate/show a toolbar or Palette

1.	Right-click within the Visual Café Window and select the object's name.

Note: You can toggle the Layout toolbar display with Layout [image] Layout Toolbar


Converting Café Applications to Visual Café

You can easily convert your Café application to Visual Café

Warning: Converted applications can not be saved back into Café format.

1.	steps TBD


Converting an Applet to an Application

Visual Café helps you convert an applet to an application. You may want to convert an applet to:

•	add more functionality

•	provide a shippable stand-alone Java program

1.	Create a new project

 Details on this step

2. 	Make the Java frame the main application window.

A Java window doesn't have menus, a Java frame can.

3.	Open your the applet project

 Details on this step

4.	Open Frame1 in the Form Designer by double-clicking on the object in the Project Window.

5.	In the Project Window, double-click on the applet to open it

6.	Select all applet components and copy the components

7.	Make the Form Designer active and paste components into Frame1

8.	Add a frame class

9.	Add Java code to the applet, if needed.

10.	Add a menu to the form

 Details on this step

11.	Add a subclass

12. 	Add any other components to the application

 Details on this step

13.	Compile and run the project


Copying Components on a Form

To copy form components to another form or within the same form, you can

•	drag the component to another form

•	copy and paste the component by using menu command

•	select the component and use the copy and paste right-mouse popup menu commands

Note: 	The object's bound events are not moved to the new location.
You must manually move any code to the new form.


Copying a Project File

Files can be copied for use in the current project or another project.

•	drag the object to another Project Window. Visual Café only allow appropriate copies

•	copy and paste the object by using menu command


Creating a Palette Tab

Add tabs to your custom Palette to help organize components.

1.	Choose File [image] Environment Options [image] Palette tab

2.	Click New Group

3.	Edit the group item name


Creating a Developer-defined Class

Extended behavior can be added to your project by adding a custom class. Classes can be added from the Class Browser or Hierarchy Editor.

1.	Select a base class for the parent of the new class.

2.	From the right-mouse popup menu, choose Add derived…

3.	In the Create Derived Class dialog, give the class a name and select a source file.

4.	Click OK


Connecting Classes

Classes can be connected from the Hierarchy Editor and Class Browser.

1.	Select class

2.	Choose Connect Base

3.	In the Add Base dialog, select the class's base from the list.

4.	Select an access specifier.

5. 	Click OK


Creating a new Document

You can create documents from within Visual Café. You may want to create documents for custom HTML pages and Java files.

1. 	Choose File [image] New
or
Click the toolbar New icon

2. 	Select the document type, Text

3.	In the text editor, edit the document.

4.	Save changes.


Creating a Project

A project is a collection of files that make up your Java applet or application. You create a project to manage and organize these files.

1.	Choose File [image] New Project...
    or
Click the toolbar New icon and select the document type Visual.

2.	In the New Project dialog, select the project template you want as the base for the new project.

The default template is indicated by an asterisk. You can easily change the default template by selecting a template and clicking Set Default.

3.	Click OK.

A new Project window opens with the selected template automatically loaded. All objects in the template are added to the project.

The default, or startup, form opens in the Form Designer.

4. 	Define the contents of the project by adding or removing files.

5.	Save the project.

 Details on this step


Creating a Template

Template are used as the base of new projects. When you create a project from a template, the project will initially contain the objects of the template.

1.	Create a project to be used as the template.

2.	With the project current in a Project Window, choose Project [image] Create Project Template.

3.	In the Create Template dialog, select the group that the template will belong to.

By default, new project templates are added to the Project Templates group. If there is no Project Template group, one is created for you.

4.	Enter a name for the template in the Name field and a ToolTip string.

The ToolTip string is used when the template displays on the Palette or is listed in the Component Library window. The name is used for the template in the New Project dialog.

5.	Click OK

The template is now available from the New Project dialog and Component Library.


Creating Object Groups

You can organize project objects and components into groups in the Project Window and the Component Library. These groups are similar to groups that you use in the Windows Explorer. Groups can only be added at the root level of the Project Window or inside another group.

The arrangement of objects in groups has no affect on the project's visual interface. Groups cannot be connected, do not have a source code file, and do not have properties.

Once created, you can move forms within groups and copy components between groups by using standard drag-and-drop methods.

Note: You cannot insert a group into the Project Window package view.

1.	Make the Project Window or Component Library active

2. 	Select the object that you want the new group to follow.

3.	Choose Insert [image] Group

4.	Rename the group folder.


Customizing Class Browser and Class Hierarchy Window Editing

You can enable multiple component selection and enable confirmation options for both the Class Browser and Class Hierarchy.

1.	Choose File [image] Environment Options [image] Editing tab

2. 	In the Class Browser and Class Hierarchy area, enable or disable appropriate options

To	Enable
Be able to select multiple classes	Allow multiple selection
Display a confirmation message before deleting a class member	Delete class member
Display a confirmation message before applying inheritance changes.	Inheritance change
Display a confirmation message before applying a change to multiple selected objects.	Change to multiple selection
Note: When the Allow multiple selection option is disabled, the Change to multiple selection option is also disabled.

Note: You can also enable a horizontal scroll bar in the Class Browser source pane by enabling the Horizontal scroll bar option in the Source window area.


Customizing Source Window Editing
Customizing Source Editor Editing

You can enable several editing options that facilitate editing in the Source Editor.

1.	Choose File [image] Environment Options [image] Editing tab

2. 	In the Source window area, enable or disable appropriate options

To	Enable
Display the entire source code file instead of a single method	Edit entire source file
Reuse the Source Editor window during debugging.	Recycle automatically
Display the Object name field and Events/Methods list box	Object pane
Display a horizontal scroll bar on the source pane AND on the source pane of the Class Browser	Horizontal scroll bar
Note: Manually opened Source Editor windows cannot be recycled.


Defining a New Default Template

The designated default template is used as the default for all new projects.

1.	Choose File [image] New Project

The current default template is highlighted and an asterisk is next to the template name.

2.	Highlight the appropriate template

3.	Click Set Default

4. 	Click OK


Defining the Help File Set

The Help file set is a group of WinHelp .hlp and .cnt files that are used by Visual Café at runtime.

1. 	Choose File [image] Environment Options [image] General tab

2. 	In the Help Files field, enter the path to the appropriate files.


Defining Visual Café's Startup Mode

1. 	Choose File [image] Environment Options [image] General Tab

2.	In the On Startup area, select the appropriate option.

To	Select
Open a new project each time Visual Café starts.	Create a new project
Open the project that was active the last time Visual Café exited normally	Open the last project
Specify that no project opens and that you will select an appropriate action after Visual Café starts	Do nothing


Deleting an Interaction

TBD -- Step procedures to be written

1.


Deleting Files from a Project

As you are developing your project, you can delete HTML and Java source as needed.

1.	Choose Project [image] Add/Remove Files…

2.	Select the appropriate file from the list at the bottom of the dialog.

2.	Click Remove.Press

OR

1.	In the Project Window, select the file to be deleted.

2.	Choose Edit [image] Delete, or press the DELETE key.

Note: You can also remove components by using this method.

Note: When you remove a source file from a project, all associated visual elements that are created in the Java code are also removed.


Deleting Objects from the Object Library
Deleting Objects from the Component Library

As you are developing your project, you can delete objects for the Component Library as needed.

1.	In the Component Library, select the object to be deleted.

2.	Choose Edit [image] Delete, or press the Delete key.


Deleting Objects from the Palette

As you customize your Palette, you may need to remove object that you no longer need on a frequent basis.

Caution: Deleting a group deletes the group and all objects in the group.

From the Palette

1.	Select an object on the Palette

2.	Right-mouse click on the Palette

3.	Select Remove Object

From the Project Window

1.	Select the object

2.	Press the Delete key

From the Environment Options dialog

1.	Choose File [image] Environment Options [image] Palette tab

2.	Select the object to be deleted

3.	Click Delete or press the Delete key.

See Also: Adding Objects to the Component Library


Deleting Objects from a Project

To be Written


Deleting Packages from a Project

As you develop your project you may need to remove package from the project.

1.	In the Project Window, select the package  and

•	choose Edit [image] Delete

•	press the Delete key


Deleting Templates from the Object Library
Deleting Templates from the Component Library

There are two ways to delete a project template:

From the New Project dialog

1.	Choose File [image] New Project

2. 	Select the template from the template list.

3.	Display the right-mouse pop-up menu.

4.	Choose Delete.

5.	Click OK

From the Component Library

To be written


Displaying the Contents of a Project

To be written


Editing a Form

To be written

1.


Enabling ToolTips
Enabling ToolTip

ToolTips display for buttons and other user-interface elements in the application toolbars, in the Palette, and in the Component Library window. You can toggle ToolTips on or off as needed.

1.	Select Project [image] Options.

2.	Click on the General tab.

3.	In the Environment Options dialog, enable or disable ToolTips with the Show ToolTips option.


Editing Files

To be written


Editing Menu Bars

The Visual Café Menu Editor allows you to size and define form menus and menu commands.

1.	Add a menu to the form

 Details on this step

The Menu Editor automatically starts.

If the menu already exists,

•	in the Form Designer, double-click on the menu object

•	in the Project Window, double-click on the menu bar icon

2.	Size the menu bar on the form

4. 	Open the Property List by choosing Window [image] Property List

5. 	Select the Caption property and enter the menu caption (link to Caption property reference page). Or highlight the menu placeholder and start typing, the text is added to the Caption property.


Enabling Docking

Visual Café forms and toolbars can be docked and undocked.

1. 	Choose File [image] Environment Options [image] General Tab

2.	In the Docking area, enable the Enable Docking option.

3.	Select the objects that have docking enabled from the object list box.


Finding a class

To locate a class in the Hierarchy Editor

1.	Type the class name you are looking for

As you type, selections changes to match the text you enter. As you continue typing, the search is refined.


Inserting a Custom Class

When a class is created, the class in inserted as a special object type in the Project Window. The class displays similar to other objects.

1. 	Choose Insert [image] Insert Class/Interface

2.	In the Insert class dialog Definition tab, enter a class name.

3.	Select the class to be extended from the Extend class list.

4. 	Select the class's access type.

Private, Public, None, Protected, Private-Protected

5.	In the Interfaces tab, select the classes that you want to implement.


Moving Components Between Forms

You can  a component to another form

•	in the Project Window, by dragging the component on top of the new form

•	in the Form Designer, by using cut and paste

Note In the Form Designer, dragging a component from one form window to another makes a copy of the component.

Notes

The object's bound events are not moved to the new location. You must manual move the code to the new class.

Forms cannot be moved into another form.

Components cannot be moved between projects.


Modifying an Object's Properties

1.	In the Form Designer, click on the component to open the Property List.

2. 	In the Property List, click on the property that you want to modify.

You can either

•	edit the value directly in the property field

•	change the value by using the dialog that automatically displays


Modifying Workspaces

You can create, delete, and rename a workspace by using the Workspaces menu option.

To change to a different workspace

Use either of these methods:

•	Choose Window [image] Workspaces [image] workspace name.

•	From the Workspace toolbar, select the appropriate workspace name.

To create a workspace

1.	Choose Window [image] Workspaces [image] New...

2.	In the New Workspace dialog, type a new name

3.	Click OK.

A new  workspace is created and the new workspace displays in the toolbar Workspace field. The workspace is also added to the Workspace list.

To rename a workspace

1.	Choose Window [image] Workspaces [image] Rename...

2.	In the Rename Workspace dialog, type a new name

3.	Click OK.

The workspace name is changed and the new name displays in the toolbar Workspace field. The name is also changes in the Workspace list.

To delete a workspace

Caution: Deleting a workspace immediately deletes the workspace that is named in the toolbar Workspace field

1.	Choose Window [image] Workspaces [image] Delete

The workspace is deleted and the next workspace in the listing is activated.


Moving a File to Another Project

To Be Written

You can use

•	drag and drop

•	cut and paste


Moving Palette Objects

Components on the Palette can be move within its group for ordering or to another group.

From the Environment Options dialog

1.	Choose File [image] Environment Options [image] Palette tab

2.	Select a Palette object and either

•	drag the object to a new location

3.	Use the up and down arrow button to reposition the object


Opening a Project

Opening a New Project

A project is opened as part of the process of creating a new project

 Details on this step

Opening an Existing Project

There are also several ways to open existing projects:

Using the Open File dialog

1.	Choose File [image] Open

2.	From the Open File dialog, select a project from the list.

3. 	Click Open

Using the Most Recent File list

1.	Choose the project name from the file list on the File menu

Using the Windows Explorer

1.	Double-click the project name (.vpj)


Performing a Global Find

File [image] Find in Files...

You can perform full-text queries of selected files by using the Global File dialog

1.	 Steps to be written


Renaming an Object

To be Written

Slow click the name, and retype. Same steps as changing the name property


Running a Project

You can compile and run a project any time during its development cycle.

Note: When a project is run, only the saved components are compiled. Visual Café prompts you about unsaved changes before running the project. You can set automatic saving at the environment level.

Choose Project [image] Run


Saving Objects and Projects

Objects and Projects can be saved at any time. When an object is saved, all child components, properties, Java sources, and interactions are also saved.

Note: When a project is run, only the saved components are compiled.

1.	In the Project Window, select the project.

2. 	Choose File [image] Save or File [image] Save As


Setting Properties at Runtime

To Be Written

1


Setting Advanced Search Criteria

You can specify file attribute and modification search criteria on the Advanced tab of the Find in Files dialog.

1.	Set attribute criteria by enabling the appropriate attribute options.

2.	Specify modification criteria by enabling the Files created or modified option.

Set the appropriate values in the Date and Time fields. The field value "ignore" disables the associated data or time field.


Setting the Global Cursor Style

You can set the cursor style for the insert and overwrite cursor.

1.	Choose File [image] Environment Options [image] Editing tab

2. 	In the appropriate cursor definition area, enable or disable the Blinking option.

3.	Select the cursor style; Block, Underline, or Vertical Bar.


Setting the Scope of the Recent File History List

A list of files that were accessed recently is available near the bottom of the File menu. You can define how many files display on the menu.

1. 	Choose File [image] Environment Options [image] General tab

2.	Enable the Show recently-used files option.

3.	Enter the number of files that you want Visual Café to store in the history list that displays on the File menu. Valid values are 1 to 9.


Setting the Scope of the Undo Command

The Undo command is available from the Edit menu and has standard Windows functionality. The default number of undoable actions is 200.

1. 	Choose File [image] Environment Options [image] General tab

2.	In the Undo area, enter the number of previous actions that you want Visual Café to store for each window.


Specifying the Search Files and Location

You can specify the search criteria, the type of files to search, and the files location on the Name & Location tab of the Find in Files dialog.

1.	Specify the search criteria. The drop down list displays the previous sixteen search string.

To	Do
Search using regular expressions	Enable the Regular expression option. The Right Arrow button displays a pop-up menu of regular expressions
Search with wildcard symbols	Enable the Match Wildcards option
Search with exact case matching	Enable the Match case option
Search for an exact match to a whole word	Enable the Match whole word only option. This option limits matches to files that contain the search criteria string preceded and followed by a space, tab, or punctuation character, or the search string starts or ends a line.
2.	Specify the types of file to search by entering files extensions or selecting from the drop down list.

3.	Select the scope of the search. You can specify a folder, the current project, or the last set of files found in a previous search.

To	Do
Expand a search into subfolders	Enable the Search subfolders option


Testing an Applet

To Be Written

1.


Viewing a Component's Java Source

You can open a component's Java source file to enhance the behavior of the component with custom Java code.

1.	In the Form Editor, double-click on the component.

Opens the Source Editor

2.	Add appropriate code to the file.


Viewing HTML Files
Viewing and Editing HTML Files

If HTML file are a part of your project, you can view the file and edit the HTML code from within Visual Café.

1.	Open the file by using one of these methods:

•	In the Project Window, double-click on the HTML file name

•	Choose File [image] Open…, select the file

2.	In the Source Editor, make any necessary edits

3. 	Save the file by choosing File [image] Save


Viewing the Properties Sets Simultaneously

If you want to view the properties of two components at the same time

1.	Make the first component current in the Property List

2.	Click the Attach button [image] to fix the active Property List window.

3. 	Choose Window [image] Property List to open another window.

4.	Make the second component active in the new window.


Cool Tasks

Adding e-mail to an applet

Adding an image

Slide shows

•	Insert >> applet; select applet template

•	Object >> edit source

•	Palette >> slideshow

•	Property List >> double click Pictures

•	Select photos, in order, OK

•	Name, connect components, close, save, run

Adding image maps

Adding animation

•	Palette >> animation component

•	Prop inspector  >> double click on Picture, Open File dialog displays

•	Select the animation cells you want to display in the correct order

•	Name the component, Save, Run applet


Tasks Class Browser
Tasks - Class Browser

Adding a method
Member pane, rt menu Add…, Add Member dialog

Adding a variable
????????

Deleting a class or an interface
Project Window, Packages tab, rt menu, Add/Remove Files, move to appropriate directory, xxxxx.java

Editing a class member
 	  Double click on a class member in the Members pane. The implementation of that method or data member is extracted form the source code and displays in the Editing pane. Changes are automatically saved back to the source file.

Finding a class
In class pane, select any class, press the keyboard key that corresponds to the first letter of the class name.

Listing classes  ???????????
 	by package
 	in alphabetical order
 	in hierarchical order

Viewing the members of a class
  	Click on a Class name in the Class pane. The class methods and members display in the Member pane.


Tasks Hierarchy Editor
Tasks - Hierarchy Editor

Find a class

Add a class

Change the derivation for a class

Remove a derivation for a class

Change the structure of a project

Delete a class or interface


Top of file f1 editors

This is the first topic in the F1_editor help file


No Help

This is no help available on this object.


Main Windows and Dialogs
Main Windows


Using the Visual Café Window

The Visual Café Window is the main interface to the Visual Café development environment.

The window consists of three main components:

•	menus

•	toolbars

•	Palette

You can open and close entire projects from the Visual Café Window.


Visual Café Menus

The menus on the Visual Café window provide all Visual Café functionality. Eight menus can display in the Visual Café window at one time.

These are the standard menus that are always available:

File  	Edit   	Project
Insert  	Window   	Help

The availability of the following menus is dependent on which tool you are currently using:

Object  	Run  	Source
Layout	Calls	Thread
Breakpoint

There are also several right mouse pop-up menus that are dependent on the active object:

•	Project Window

•	Form Designer

•	Class Browser

•	Hierarchy Editor

•	Source Editor


Menus


Help Menu

The following options are available from the Visual Café Window Help menu:

TBD


File Menu

{button Overview,AlinkNew_Project_dialog_F1;New_File_Dialog_F1;Find_in_Files_dialog_F1;Environment_Options_Dialog_F1, , , )}

The following options are available from the Visual Café Window File menu:

New Project...

Opens the New Project dialog so you can create and open a new project.

New...

Opens the New File dialog so you can select the type of file to create.

Open...

Opens the Open File dialog so you can select and open a file.

Close

Closes the active file, view, or project. The menu option reflects the name of the active object. The default command is “close project.” When a project closes, all windows associated with that project also close. Visual Café prompts you about any unsaved changes.

Save, Save As, Save All

Saves files to disk. Functionality is the same as MS Windows. If no window is open, the default is “save project.”

Find in Files...

Opens the Find in Files dialog so that you can search selected files.

Page Setup, Print...

Configure printing and print active window. Functionality is the same as MS Windows.

Environment Options...

Opens the Environment Options dialog so that you can customize your Visual Café development environment. The options are global and apply to all projects.

Exit

Closes the active project after prompting to save unsaved changes, then closes Visual Café.


Edit Menu/Toolbar
Edit Menu

The Visual Café Window Edit menu provides standard system edit commands such as undo, redo, cut, copy, paste, and delete.


Project Menu

The following options are available from the Visual Café Window Project menu:

Run

Compiles and run the current project.

Step Into

Build

Add/Remove Files..

Opens the Project File dialog when you can easily add and remove files.

Create template...

Opens the Create Template dialog.

Switch main project...

Allows you select an existing project as the new active project.

Options...

Opens the Project Options dialog.


Insert Menu

The following options are available from the Visual Café Window Insert menu. This menu allows you create new project objects and add forms, files, and objects to the project.

Form...

Opens the Insert Form dialog.

Applet

Inserts an applet if there are no saved applet objects, or opens the Insert Applet dialog where you can select an applet from a list of saved applets.

Object...

Opens the Insert Object dialog

Group

Adds a group to the current project or group

Variable...

Opens the Insert Variable dialog box where you can name a new variable or method and set the type and scope of the member.  This command is only available when the Source window or Class Browser is active.

Class/Interface

Opens the Insert Class dialog.

Package

Adds a package to the Project Window package view.


Window Menu

The following options are available from the Visual Café Window menu:

New Window

Creates a new instance of the active window. Each new instance of the same window is incremented to indicate the number of open windows.

Workspaces…

workspace names
Selecting a workspace from the list saves your current workspace and configure your environment to the new layout

New…	allows you to create a new workspace
Rename…	allows you to rename a workspace
Delete	allows you to delete a workspace

Class Browser

Starts the Class Browser

Hierarchy Editor

Starts the Hierarchy Browser

Property List

Starts the Property List

Debugger commands

Opens the respective debug window

Watch
Breakpoint
Messages
Thread
Variables
Call Stack

Component Library

Shows or hides the Component Library window.


Object Menu

The following options are available from the Visual Café Window Object menu:

Edit object...

Opens the selected item in its editor. This command is only enabled when the selected object is a form or visual object.  The menu name changes to reflect the type of object selected.

Edit Source...

Opens the Source window for the selected object. Allows you to view the code associated with an object.

Add Interaction...

Opens the Interaction Wizard where you can create an interaction for objects in your project.

Add to Library...

Opens the Add to Library dialog to allow you to save the selected object in the Component Library.


Layout Menu

The following options are available from the Visual Café Window Layout menu:

Align

Aligns the selected objects relative to their right, left, top, or bottom edges.

Align [image] To Grid

Aligns the upper left corner of the selected object(s) to the nearest grid point.

Center

Centers the selected objects relative to their physical center either vertically or horizontally

Space Evenly

Spaces the selected objects evenly on a vertical or horizontal axis.

Make Same Size

Resizes the selected objects' vertical and/or horizontal dimension based on the anchor object.

Bring to Front

Brings the selected object to the front of other objects on the form.

Send to Back

Puts the selected object behind other objects on the form.

Grid Options…

Opens the Grid Options dialog.

Invisibles

Toggles the display of invisible objects. The default state for invisible objects is hidden.


Source Menu

The following options are available from the Visual Café Window Source menu. These commands affect the debug setting or cursor placement in the Source Editor.

Watch Variable

Adds an entry to the Watch window for the selected variable.

Toggle Breakpoint

Sets or clears breakpoints on the current line. The toggling is based on whether or not a breakpoint is set for the current line of source code.

If no breakpoint is set, this command sets a breakpoint on the current line. If a breakpoint is set, a stop sign icon appears in the left margin next to the current line. If there is a breakpoint on the current line, the command removes the breakpoint.

Set Conditional Breakpoint

Opens the Conditional Breakpoint dialog where you can set the breakpoint to occur when a variable is read or when it is written.

Go to Line...

Opens the Goto Line window where you can specify a line number to move to

Go to Function...

Finds the matching parenthesis, or brace.

Go to Definition...

Moves the selection to the location in the source where the selection, or word surrounding the selection, is defined.

Go to Matching Delimiter...

Finds the matching parenthesis or brace based on the selected character

Go to Bookmark...

Opens the Bookmark window when you can select a bookmark to jump to

Go to Buffer…

Opens the Edit Buffer dialog where you can change buffer attributes.


Run Menu

The following options are available from the Visual Café Window Run menu:

Restart

Restarts the program from the beginning

Pause

Stops and starts the program's execution from the "stopped" point

Stop

Terminate the program execution

Step Into
Step Over
Step Out

The Step commands allows you to debug a program by stepping through code after a breakpoint

Run to Cursor

Resumes program execution until the currently select line is reached.

Run to End

Runs the program from the beginning until normal termination.

Options...

Opens the Project Options dialog where you can set debugging options under the Debugger tab.


Go To Menu

The following options are available from the Visual Café Window GoTo menu:

Line…

Opens the Goto Line window where you can specify a line number to move to

Matching Delimiters

Finds the matching parenthesis or brace based on the selected character

Bookmark

Opens the Bookmark window when you can select a bookmark to jump to

Buffer…

Opens the Edit Buffer dialog where you can change buffer attributes.


Macro Menu

The following options are available from the Visual Café Window Macro menu:

Record macro

Play

ScriptMaker


Breakpoint Menu

The breakpoint menu is available when your applet or application are running.

The following options are available from the Visual Café Window Macro menu:

Clear

Clear all

Clear one or all breakpoints

Enable

Enable all

Enable one or all breakpoints

Disable

Disable all

Disable one or all breakpoints

Go to Source

Opens the Source Editor with focus on the current breakpoint.


Thread Menu

The following options are available from the Visual Café Window Thread menu:

Set Focus

Suspend

Suspend the execution of the program.

Resume

Restart execution of the program from the previous suspend point.

Suspend others

Resume others


Call Menu

The following options are available from the Visual Café Window Call menu:

View parameter values

View parameter types

Go to source…

Opens the Source Editor

Go to variables…

Opens the Variables window

Set focus


Popup Menus


Form Designer Pop-up Menu

When you right mouse click on an component in the Form Designer, Visual Café displays this menu:

Bring to Front

Send to Back

Align to Grid

See Layout menu for information about these commands

Edit Source

Opens the Source Editor for the component.

Add Interaction

Allows you to draw a line from the trigger component to the action component. Opens the Interaction Wizard.

Add to Library…

Opens the Add to Library dialog

Layout Toolbar

Toggles the display of the Layout toolbar.


Project Window Pop-up Menus

When you right mouse click on an object or package in the Project Window, Visual Café displays a popup menus with a selection of the following commands as appropriate:

Insert object

This Insert command reflects the selected object. The appropriate dialog opens.

Insert…

Opens the Insert Dialog

Insert Group

Inserts a group, see Creating object groups

Add/Remove Files..

Opens the Add/Remove dialog.

Edit object

This Edit command reflects the selected object. The appropriate editor opens.

Edit Connections

Starts the Interaction Wizard


Class Pane Pop-up Menu

When you right mouse click on an object in the Class Browser's Class pane, Visual Café displays this menu:

Add Derived..

Add Derived Class of xxxx dialog

Add Top..

Add Class dialog

Add Sibling..

Add Derived Class of xxxx dialog

Go to Source

Opens the class Java file in the Source Editor

Connect Base

Opens the Add Base dialog

Delete Base

xxxxx


Member Pane Pop-up Menu

When you right mouse click on an object in the Class Browser's Member pane, Visual Café displays this menu:

Add…

Opens the Add Member dialog

Override…

Delete

Deletes the selected method

Edit Attributes…

Opens the Change Member Attributes dialog

Go to Source

Opens the Source Editor with focus on the selected member


Hierarchy Editor Pop-up Menus

When you right mouse click on an object in the Project Window, Visual Café displays this menu:

Current menu is very different from spec


New Project Dialog Pop-up Menu

When you right mouse click on an object in the New Project dialog, Visual Café displays this menu:

Delete

Deletes the selected template

Properties

Opens the Property List for template property editing.


Object Library Pop-up Menu
Component Library Pop-up Menu

When you right mouse click on an object in the Component Library, Visual Café displays this menu:

Cut
Copy
Paste
Delete

Insert Group

Creates a new group item.

Add to Palette

Adds the selected object(s) to the active Palette tab, at the end of the object list.


Source Editor Pop-up Menus

When you right mouse click on an object in the Project Window, Visual Café displays this menu:

Current menu is very different from spec

Source Editor

•	seems to be the same as the Class Browser editing pane


Toolbars


Visual Café Toolbars

Visual Café provides an extensive set of toolbars. Toolbars can in docked in the Visual Café Window or floated on the screen.

There are five toolbars in the Visual Café window:

•	standard

•	layout

•	views

•	debug

You can enable and disable the toolbar icon ToolTips.

You can also control toolbar position and visibility.


Using the Standard toolbar

The Standard toolbar provides icons for the most common tasks that you perform when using Visual Café. The icons execute standard Windows tasks.

From the toolbar, you can

•	open an existing document

•	save the active document

•	cut/copy/pasting

•	print information

•	display information about Visual Café

•	activate context sensitive help


Using the Palette

The Palette contains a variety of components that you can add to forms. The Palette can contain visual objects, program modules, database objects, such as queries, reports, and transactions, and form templates.

You can control the Palette's position and visibility by docking, floating, resizing, and hiding.

 The Interaction Tool allows you to visual connect two component's behavior to create an interaction.

 The Selection Tool is enabled by default. Click on this icon to return you to object select mode.

By default, the Palette contains the a default set of components. You can customize the Palette to contain the objects that you use most often.


Using the Layout Toolbar
Layout Toolbar

The Layout toolbar provides quick access to the common commands that you use when using the Form Designer.

The icons on the Layout toolbar perform standard Windows graphic object layout tasks

Tasks that you can perform

Align objects by their left/right edges or top/bottom edges

Center objects vertically or horizontally on the form

Space objects vertically and horizontally

Size objects equally in respect to vertical, horizontal, or both

Toggle the alignment grid on or off

Toggle the display of invisible objects


Using the Views Toolbar
Views Toolbar

The Views toolbar gives you quick access to different views into your project and debugging tasks.

You can access these windows:

•	Project Window

•	Property List

•	Class Browser

•	Hierarchy Editor

Tasks

Watching a variable or expression

Setting a breakpoint

Debugging threads

Viewing the current variable values

Viewing a call stack


Using the Workspace Toolbar

The Workspace toolbar allows you to select an existing workspace.

By default, there are two workspaces defined. Your workspaces may display differently than defined below because the workspace's state is saved as you close Visual Café tools.

Edit

Displays the Project Window, Form Editor, and Property List

Debug

Displays the Project Window and Variable, Call, and Breakpoints windows.


Using the Debug Toolbar
Debug Toolbar

The Debug toolbar provides easy access to the commands that you use most often when debugging your program.

Tasks

Running a program

Pausing a program

Stopping a program

Stepping into a method

Stepping over a method

Toggling a breakpoint

Watching a variable


Tools
Tools and Window


Using the Class Browser
Class Browser

Window [image] Class Browser

The Class Browser is a three-pane window that lists the Java classes in your project and the methods and data members contained within each class.

The Class Browser allows you to quickly navigate and edit your classes. You only see the methods and data members for the selected class, and only the Java code for the selected member. The isolation of member source code provides an extra degree of security by ensuring that you do not unintentionally change code outside of the object’s scope.

Both the Class and Member panes support keyboard incremental searches. As you type the name of a class or member, the list of matching objects is refined until the desired class is automatically selected.

The Class Browser has right-mouse popup menus for these areas:

•	Class pane

•	Members pane

•	Editing pane

Tasks

Adding a class

Adding a method

Adding a variable

Deleting a class or an interface

Editing a class member

Finding a class

Listing classes by package

Listing classes in alphabetical order

Listing classes in hierarchical order

Viewing the members of a class


Using the Hierarchy Editor
Hierarchy Editor

Window [image] Hierarchy Editor

The Hierarchy Editor allows you to visually navigate and edit the relationships between the Java classes in your project. The editor displays a visual representation of the project’s current structure.

You can directly manipulate the structure of an application by dragging and dropping from one class to another. Changes made to classes or inheritance relationships in the Hierarchy Editor's main window or associated dialog boxes are automatically changed in the underlying source code. and in all open windows in the Visual Café environment.

In addition to using the toolbar or menus to work with classes in the Hierarchy Editor, you can use the mouse. Right-clicking on a class or on the inheritance line between a parent and extended class provides a context-sensitive list of options in a pop-up menu.

Tasks

Finding a class

Adding a class

•	You can create new subclasses by clicking on a class and dragging to an empty area of the workspace.

•	You can create a new parent-sibling relationship by clicking on a class and dragging to the desired parent.

Creating a Developer-defined Class

•	Double click on a class to open the Class Editor

•	You can change inheritance by clicking on the line between a parent and base class, then dragging the line by its anchor to another base class.

Removing a derivation for a class

Changing the structure of a project

•	drag and drop between classes

Deleting a class or interface


Using the Interaction Wizard
Interaction Wizard

A interaction can imply either event notification or data transmission, depending on the different objects involved. The Interaction Wizard allows you to graphically build relationships between objects: Visual Café automatically generates code for the specified relationship.

Tasks

Connect two components

Changing an existing connection

Delete a connection


Using the Property List
Property List

Window [image] Property List

The Property List maintains design-time properties for visual objects. When you change a property, the form and Java source code is immediately updated.

The Property List displays a list of properties that are applicable to the current object and the property's current value. Properties with multiple values are marked with a plus sign "+", for example, the textStyle property.

Properties that are defined using a dialog box are marked with the ellipse button. "…"

To change properties without opening the Form Designer, click on the component in the Project Window.

Tasks

Selecting a new component as current

Changing a property value

Viewing multiple sets of component properties


Using the Form Designer
Form Designer

The Form Designer is the main tool for designing the interface to your applet or application. You use the WYSIWYG Form Designer to create applets, dialog boxes, message boxes, and windows.

The Form Designer is fully integrated into the Visual Café development environment. As you design your forms, the form, its Java source, the properties of the form and its components, and the projects are dynamically kept in sync.

Visual Café provides this powerful functionality by using a Java virtual machine to read and maintain source code while you design.

To access other tools from the Form Designer:

Click component	Opens
Once	Property List
Twice	Source Editor
Tasks

Adding components to a form

Modifying a component’s properties

Adding a connection between two components

Adding a component to the Visual Café library

Arranging components on a form

Enabling and disabling the grid

Enhancing an component’s Java code

Using invisible objects


Using the Menu Editor
Menu Editor

TBD

Tasks


Using the Project Window
Project Window

File [image] Open…
File [image] New Project…

The Project window displays a list of objects in the current project (Objects tab) and the Java packages that are associated with the project (Packages tab). The window can be docked and resized.

You can expand and collapse project forms to view the object's child components by using the standard Windows keyboard sequences and visual expansion element (+).

To access other tools from the Project Window:

Double-click on	Opens
Form	Form Designer
Java file	Source Editor
Tasks

Viewing a project by objects

Viewing a project by packages

Editing a form

Viewing the Java source code

Connecting two components

Adding objects to a project

Deleting objects from a project


Viewing Project Objects
Project Objects View

Project Window [image] Object View tab

An object view of a project lists the project’s visual objects. You can expand or collapse the content list of each form.

To access other tools from the Object tab

Single-click on	Opens
Form or applet	Property List
Component	toggles the Property List
Double-click on	Opens
Form or applet	Form Designer
Menu	Menu Editor
Component	Source Editor
File	Source Editor
Tasks

Creating object groups

Adding an object to a project

Moving a component to another form

Copying a component on a form

Opening the Property List to modify component properties

Renaming an object

Deleting an object


Viewing Project Packages
Project Packages View

Project Window [image] Package Tab

The package view of a project lists the project’s Java source class files grouped by packages.

Double-clicking on a form, control, menu bar, or source file, opens the appropriate editor for editing of the object. Double-clicking on a group or package, expands or collapses the container.

Note: Classes that have not been added to a package display under the Default package. Only source files that have been added to the project are listed.

Tasks

Adding new packages to the project

Deleting packages

Adding files to a project

Deleting files from a project

Renaming an object

Moving a file to another projects

Copying a file

Viewing Java source files in the project

Displaying only the Java source files that were created or manually add to the project


Using the Object Library
Component Library

Window [image] Component Library

The Component Library is a repository for storing, organizing, and displaying project objects. The library can contain forms, windows, databases, Visual Café components, third-party components, and applets that are accessible by all projects.

In addition to the standard Java class components, Visual Café gives you components such as spin button, image button, animated image button, slider, progress bar, popup menu, formatted edit fields, tab bar, tree view, and grid.

The default library is located in the Visual Café library directory.

You can customize the Visual Café palette toolbar with component from the Component Library.

When you select an object in the library list, the object's properties are viewable in the Property List, but are not editable.

To open another view of the Component Library by choosing Window [image] New Window.

To hide the Component Library window by disabling Window [image] Component Library.

Tasks

Adding objects to a form

Adding objects to a project

Adding objects to the Palette

Adding objects to the Component Library

Deleting objects from the Component Library

Adding groups to the Component Library


Using the Source Window
Source Editor

Object [image] Edit Source…

The Source Editor allows you to create, display, and edit Java and HTML code. Navigation aids help you move through your code and full Java syntax highlighting make it easy to find code areas.

The Source Editor is tied to the active object and its class files. Therefore, only the events and methods that are valid for the component are presented.

Any changes that you make directly in the Source Editor are immediately reflected in the Form Designer.

The Source Editor has three areas:

•	active object drop down box

•	event drop down box

•	source pane

The active object field displays the name of the current active object. You can use the drop down list to select other objects in the form.

In the event drop down box, Visual Café displays all events that are associated with the active component’s class. Events that have code associated with them appear in boldface text. You can select a method to edit from this list and the associated code displays in the source pane.

Other ways to access the Source Editor.

Select an object in the Form Designer or Project Window and choose Edit Source.. from the right-mouse popup menu

Select an object in the Form Designer and double-click on the component

Tasks

Adding events to a component

Monitoring program execution while debugging

Editing an HTML file


Breakpoints Window

Contains a list of all breakpoints you’ve defined in a project. Use this window to add, remove, or modify breakpoints.

Tasks

Ignoring Breakpoints

Managing Breakpoints

Setting a Breakpoint

Clearing a Breakpoint

Enabling or Disabling a Breakpoint

Modifying a Conditional Breakpoint

Setting a Breakpoint on a Line Number

Setting a Breakpoint on a Method Name

Setting a Breakpoint on a Variable or Expression

Setting a Conditional Breakpoint

Stepping Code After a Breakpoint

Toggling a Breakpoint

Viewing Source for a Breakpoint


Call Stack Window

Shows all the active method calls leading to the current process.

Tasks

Viewing the Call Stack

Viewing Parameters for a Method on the Call Stack

Viewing Source for a Method on the Call Stack

Viewing the Call Stack for a Thread

Viewing Variables for a Method on the Call Stack


Messages Window

Displays all Visual Café messages. You can double-click on any error message to open the file in which the error was detected.


Thread Window

Shows all the existing threads your program has created and the state of each thread.

Tasks

Debugging Threads

Debugging a Single Thread

Resuming Other Suspended Threads

Suspending a Thread

Suspending Other Threads

Viewing Source for a Selected Thread

Viewing the Active Variables in a Thread

Viewing the Call Stack for a Thread


Variables Window

Shows the variables that are active in the current context. You can modify these variables directly in this window.

Tasks

Viewing and Modifying Variables

Watching Variables and Expressions

Modifying a Variable in the Variables Window

Viewing the Value of a Variable

Viewing Type Information for a Variable

Watching a Variable or Expression


Watch Window

Displays the value of variables or expressions you want to watch. You can modify these values directly in this window.

Tasks

Watching Variables and Expressions

Deleting a Variable or Expression from the Watch Window

Modifying a Variable or Expression in the Watch Window

Watching a Variable or Expression


Dialog Boxes


Using the Add to Library Dialog

Object [image] Add to Library...

The Add to Library dialog allows you to add objects to the Component Library.

1.	Select the group that the object will belong to.

2.	Enter a name for the object in the Name field and a ToolTip string.

The ToolTip string is used when the object displays on the Palette or is listed in the Component Library window.

3.	Click OK


Using the Add/Remove Files Dialog

Project [image] Add/Remove files...

The Add/Remove dialog contains a list of files in the project. When a file is added, the file name is highlighted in the Project Window.

To remove a file

1.	Select the file.

2.	Click Remove or press the Delete key.

To add a file

1.	Locate and select the files to be added.

2.	Click Add
or
Click Add All to add all files in the current directory.


Using the Bookmark Window

Source [image] Go to Bookmark…

To be written


Using the Create Derived Class Dialog

To be written


Using the Create Template Dialog

Project [image] Create Template

The Create Template dialog allows you to add a custom templates to the Component Library. You can add templates for dialogs, database objects, projects, forms, and components.

Tasks

Creating a template

Deleting Templates from the Object Library


Using the Edit Buffer Dialog

Source [image] Go to Buffer…

To be written


Using the Edit Connection Dialog

The Edit Connection dialog lists all controls on the active form. Components that trigger an action or connection are shown in bold.

1.	Select the connection

The Interaction Wizard starts.

2.	In the wizard, make any changes.

 Details on this step


Using the Conditional Breakpoint Dialog

Source [image] Set Conditional Breakpoint…

To be written


Using the Find in Files Dialog
Find in Files Dialog

File [image] Find in File...

Use the Find in Files dialog to globally search your project or a folder for a phase. There are several options for refining the search.

To start a search, click on Find... When the search is finished, Visual Café displays the results in a window. You can double-click on a file to open it.

Tasks

Specifying the name and location of the files to be searched (Name & Location tab)

Setting advanced search criteria (Advanced tab)


Using the Goto Function Dialog

Source [image] Go to Function

To be written


Using the Goto Line Window

Source [image] Go to Line…

The Goto Line Window allows you to specify a line number in the current object's source code that you want to jump to.

1.	To be written


Using the Grid Options Dialog

Layout [image] Grid Options

To be written


Using the Insert Class dialog
Insert Class dialog

Insert [image] Class/Interface

The Insert Class dialog lets you create custom classes that extend the Java class java.lang.object or a subclass of another custom class.

Tasks

Inserting a custom class

Modifying classes


Using the Insert Form dialog

Insert [image] Form...

The Insert Object dialog displays all  form templates from the Component Library.

1.	Select a template for the new form

2.	Click OK

The form is added to the project and opened for editing in the Form Designer.


Using the Insert Object dialog
Insert Object dialog

Insert [image] Object

The Insert Object dialog allow you to add appropriate objects directly from the Component Library. The object list is filtered based on the current selection when the dialog is opened.

You can also access the Insert Object dialog from the Project Window by choosing Insert.. from the right-mouse popup menu

Tasks

Adding objects to a form

Adding objects to a project

Adding objects to the Palette


Using the Interaction Wizard

To be written

See Understanding Component Interactions  and Using the Palette


Using the New File Dialog

 File [image] New...

To be written


New Project Dialog - Insert Applet Dialog

File [image] New Project...

The New Project dialog allows you to create a new project from an existing template.

Initially, the default project template is the Basic Applet template. The current default template is identified by bold font.

You can create custom templates and add them to the template list. All project template objects from the default library are listed in the template list. If there are no templates in the default library, then a basic applet project is creates.

Standard view buttons are provided on the dialog.

Shows the project templates as large icons.

 	Shows the project templates as small icons.

 	Shows the project templates in a list.

 	Shows the project templates in a detailed list that includes the template name, creation date, and modification date.

Tasks

Defining a new default template

Creating a new project

Remove templates from the Component Library


Using the Open File Dialog

File [image] Open...

The Open File dialog allows you to open any file.

When you select a Visual Environment Project file (.vpj), the project opens using the last saved workspace and window configuration.

When you select a Java source file (.java) or HTML file (.html), the Source Editor opens for source code editing.

Note: When you open a file, Visual Café does not automatically add the file to the current project.


Project Dialog


Using the Project Options Dialog
Project Options Dialog

Project [image] Options...

Visual Café allows you to set options that are local to a single project.

Note:To set global options that affect all projects, use the Environment Options dialog.

Tasks

Defining the project and release type and runtime

Controlling compiler information

Setting interpreter options

Specifying the search path for files

Setting debugger options


Defining Project Type and Runtime Options

Project Options dialog [image] Project tab

To be written


Controlling Compiler Information

Project Options dialog [image] Compiler tab

To be written


Setting Interpreter Options

Project Options dialog [image] Interpreter tab

To be written


Specifying the File Search Path

Project Options dialog [image] Directories tab

To be written


Setting Debugger Options

Project Options dialog [image] Debugger tab

Use the options on this tab to customize the behavior of Visual Café during debugging.

1.	Select a debugger category

Available options are General and Exception.

2. 	If you select General, specify if you want to enable remote debugging. This allows you to debug your program from a remote site

If enabled, supply an address for the remote host machine and a password for the remote host.

3.	If you select Exception, from the Class column, select the class whose exception-handling you want to specify and select the exception-handling behavior for that class in the corresponding Action column field. A drop down list of valid options is provided.


Environment Dialog


Using the Environment Options Dialog
Environment Options Dialog

File [image] Environment Options...

Visual Café allows you to set options that are global to all of your projects.

Note:To customize a single project, use the Project Options dialog.

Tasks

Setting general environment options

Building a Custom Palette

Saving and backing up files

Changing window, pane, editor, and source code appearance

Setting options for Class Browser, Hierarchy Editor, and Source Editor

Defining file type formatting

Mapping Visual Café commands to keystroke


Setting General Environment Behavior

Environment Options dialog [image] General tab

There are several Visual Café environment options that apply to general Visual Café behavior.

Tasks

Enabling and disabling docking

Enabling and disabling ToolTips

Defining how Visual Café starts

Setting the Undo command's scope

Defining the online help file set

Setting the recently files history list scope


Customizing the Palette from the Palette Tab

Environment Options dialog [image] Palette tab

The Palette tab provides two panes for object display. The Component Library pane contains the exact same display as the Component Library dialog. The Palette pane represents the tabbed Palette toolbar.

Groups in the Palette pane represent tabs and the objects in each group are objects that display as icons on the tab.

Tasks

Adding objects to the Palette

Deleting objects from the Palette

Creating Palette tabs

Moving objects on the Palette


Defining Save and Backup Options

Environment Options dialog [image] Saving tab

Visual Café provides several options to help automate when project saves and backups are performed.

Tasks

Automating project saves

Automating project backups


Customizing Your Environment's Appearance

Environment Options dialog [image] Display tab

Visual Café allows you to set the font, style, and colors for development environment windows, Visual Café tools, and window objects. You can also change the appearance of element in your source code, for example, comments, keywords, current line, and breakpoints.

1.	In the Category area, select the object that you want to change.

Note: When you select All Windows, the sub-component list box displays a set of common components. Common component changes apply to all objects that contain the component.

2. 	In the Color and Style area, select the child object that you want to change from the sub-element list box.

3.	Select appropriate values for font, font size, foreground and background color, and font style.


Customizing Editing Windows

Environment Options dialog [image] Editing tab

Visual Café allows you to change standard editing functionality

Tasks

Setting the global cursor style

Customizing Class Browser and Class Hierarchy window editing

Customizing Source Editor editing


Defining Automatic File Type Formatting

Environment Options dialog [image] Auto-format tab

1.	TBD -steps to be written


Mapping Visual Café Commands to the Keyboard

Environment Options dialog [image] Keyboard tab

Visual Café lets you define a custom keystroke sequence for many Visual Café commands and macros

1.	From the command list, select the command or macro to customize.

If an item has more than one key assignment, the item appears multiple times in the list. You can click the column header to sort the list by command or key assignment.

2. 	In the New Key Assignment field, enter a new value or edit an existing value. To insert a standard editing key, move the cursor into the field and click on the appropriate button in the Insert Key area.

If the value that you enter is already mapped to a command or macro, that object's name appears in the Currently Assigned To area.

3.	Assign the key sequence(s) to the object by clicking Assign.

4. 	Save all current key assignments by clicking Save.

The information is saved to a .key file.

Other tasks

To	Do
Clear the key assignment for an object	Select the object in the command list and click Clear
Load a saved .key file	Click Load
Copy the entire command/key assignment list as text	Right mouse click and enable Copy All
To hide commands that do not have key assignments	Right mouse click and enable Unbound commands


ToDo stuff


Base Glossary
Original Glossary of terms


Access

Specifies how a variable can be used in code.

Public — available to any class.

Protected — available to classes in the same package or subclasses.

Private — available to the class.

None — available to any class in the package (excluding subclasses that are not in the same package).


Active window

The window which receives keyboard input.  Only one window can be active at any time.


Anchor object

The starting point for a selected range of objects.  An anchor object is established at the object first added to the. selection.


 Applet

A small program that can be added to a web page and run by Java-enabled Web browsers (or the AppletViewer). Applets are typically simple, and are limited in what they are allowed to do.


Application

An extension of Frame, the class created from the Application template is a good base class for a main application window. It can exist by itself, contain components and menus, and can be used to show dialogs and windows


Application window

This is the main window which contains the menu bar and tool bars that you can use to interact with any of the Visual Café views.


Boolean expression

An expression that evaluates to true or false.


Break mode

Temporary suspension of a running program.  In break mode, you can edit code, edit forms, set or clear breakpoints, edit watchpoints, or restart, step, or stop your application.


Breakpoint window

Contains a list of ll breakpoints in a project.  Use this window to add, remove, or modify breakpoints.


Bytecode

Machine-independent code generated by the Java compiler and executed by the Java interpreter.


Call Stack window

At run time, this window shows all the active method calls leading to the current process.  When a method is called, it is added to the stack. When the method returns, it is taken off the stack.

The currently executing method appears at the top of the stack and older method calls below that.


Class

A collection of attributes and methods that defines the implementation of a particular kind of object.

A class definition defines instance and class variables and methods, as well as specifying the interfaces the class implements and the immediate superclass of the class.


Class Browser

Shows the classes and methods in the active project as well as an edit area for working with source code for a method.


Class member

A variable or method defined in a class


Class method

An action as defined by and associated with a class.

Any method that can be invoked using the name of a particular class.  A class method affects the class as a whole, not a particular instance of the class.


Class variable

A data item associated with a particular class as a whole--not with particular instances of the class. Define class variables in the class definition.


Component

A visual object that you place on a form to allow users to interact with your program.

You can customize the properties of a component or edit events for a component to changes its run-time appearance and behavior.  Access components and other visual objects in the Palette or in the Object Library window.

Components are called “controls” in C++.


Container

Objects which can contain components. Forms and Panel components act as containers to which you can add components.


Context menu

A menu that appears when you click the right mouse button in a Visual Café window.


Control

A object which you can add to a form which has a unique set of properties and events.


Debug mode

Temporary suspension of a executing program.  In debug mode, you can edit code, edit forms, set or clear breakpoints, debug threads, view the calls on the call stack.  After making any edits you want, you can restart, stop, or continue your program.


Debug Toolbar

Contains single-button shortcuts to: Start/Resume/Stop execution, Step Into/Over a Method, Toggle a Breakpoint, Watch a Variable.


Declaration

A statement that establishes an identifier and associates attributes with it, without necessarily reserving its storage (for data) or providing the implementation (for methods).


Definition

A declaration that reserves storage (for data) or provides implementation (for methods).


Design time

The time when you build an application in the development environment by creating forms, adding components, and changing the look and behavior of objects in your project.


Dialog

A simple window with a title bar. Dialogs cannot be used by applets, and are not suitable for use as a main window for an application. You can add components, but not menus. Use for temporary windows.


Dock

To manipulate a window, such as a toolbar, such that it aligns itself with the edge of another window, or along the edge of the screen or workspace.


Docking window

A window which when moved is fixed automatically to the nearest workspace border.  You can override this behavior by holding down the CONTROL key while moving the window.


Event

An action or occurrence to which an object can respond.  Example events include clicks, key presses, and mouse movements.


Form

A container for components that the user can work with at runtime.  Windows, dialog boxes, message boxes, and applets are some of the Visual Café form types.

You can use window objects to display components or other forms.


Frame

A general-purpose window. You can add components and menus to Frames.  Most of the time, when you want a "window" you want a Frame. The class generated by this template would not be used as a main window for an application, but would be displayed up by either an application or applet.


Garbage collection

The automatic detection and freeing of memory that is no longer in use.  The Java runtime, system performs garbage collection so that programmers never explicitly free objects and other data.


Global view

Views that are accessible from the Window menu.

Global views include the Property Inspector, Class Browser, Watch window, Breakpoint window, Call Stack window, Palette, Object Library window, and tools bars. The Project window, Source windows, and forms are not global.


Interaction

A relationship you define between two or more visual objects which automatically generates code.  You can create a connection between objects on a form, or between a component on one form and another form. An interaction consists of two component, a trigger event, and an action.

For example, you can connect a button (the trigger component) to a text box (the action component) so that when the user clicks on the button (the trigger event) the associated text box is enabled for data input (the action).


Java Virtual Machine

The Java Virtual Machine (Java VM) contains a bytecode translator that converts the download binary Java files into instructions to be executed by the client machine. The Java VM also contains the routine libraries that are called by the Java applet.


Identifier

The name of an item in an Java program.


Inheritance

The concept of classes automatically containing the variables and methods defined in their superclasses.


Instance

A data item based on a class. Any one of a set of objects sharing the same class.

For example, multiple instances of a Form class share the same code and are loaded with the same components with which the Form class was designed.  During run time, the individual properties of components on each instance can be set to different values.


Instance method

Any method that can be invoked using an instance of a class, but not, using the class name.


Instance variable

Any item of data that's associated with a particular object.  Each instance of a class has its own copy of the instance variables defined in the class.


Invisible object

Invisible objects are components that are visible during form design and invisible at runtime. An example of an invisible object is a menu bar.

Because these components are invisible at run-time, you have the option to hide invisible components by toggling Layout [image] Invisibles.


Java File

Contains visual objects and source code.  Components are common objects, such as applets, forms and buttons, used to create a visual interface.


Java Frame

A rectangular object that provides a background for a collection of components.

In Visual Café, a Java frame is the form that you edit while designing applets and application frames.


Layout

A property of forms and panels which automatically arranges components within a container so that they display nicely on different platforms, screens, and at different resolutions.


Local variable

A data item known within a block, but inaccessible to code outside the block.  For example. any variable defined within Java method is a local variable and can't be used outside the method.


Method

A procedure that acts on a visual object or component.


Messages Window

Displays all Visual Café messages.  For example, if an error is encountered during parsing, the error message is displayed here.  You can double-click on an error message to open the file in which the error was detected.


Modal

Describes a window or dialog box that requires you to take some action before the focus can switch to another form or dialog box.


Modeless

Describes a window or dialog box that does not require user action before the focus can be switched to another form or dialog box.


Non-visual object

A class defined in source code only.


Object

An object can be either a visual object or a non-visual object.


Object library

Contains all the objects you can use to build a program.  When you create a project template or add an item to the palette, the object is stored in the object library.  To view the contents of the object library, choose the Object Library command from the Window menu.


Objects View

A view of the project that lists only visual objects.  You can expand forms to show the components on the form.


Overloading

Using one identifier to refer to multiple items in the, same scope.  In the Java language, you can overload methods but not variables or operators.


Overriding

Providing a different implementation of a method in a subclass of the class that originally defined the method.


Package

In the Java language, a group of classes.  Packages are declared with the package keyword.


Package View

A view of the project that lists both visual and non-visual objects.


Palette

Provides quick accessibility to tools that can be used to add commonly-used objects to a project.  You can place any object in the object library on the Palette.


Panel

General purpose areas that can be added to another container.  Panels have no visible border, they can be used to break up windows into logical regions.


Project

A set of visual objects (components) and code that integrate to form an applet or application.


Property

A named attribute of an visual object or component.

Properties define object characteristics such as size, color, and screen location, or the state of an object, such as enabled or disabled.


Property page

A group of properties on a tabbed page of a property sheet


Property sheet

A secondary window that displays the properties of an object when you chooses its Properties command.


Record set

A set of records defined by a recordSet component.


Run Mode

The time when your program is running and you can interact with your program like a user.  From Run Mode you can pause your program and start debugging by typing CONTROL+BREAK.  When you are in Run Mode, the Project Menu is replaced by the Run Menu which provides debugger-specific choices.


Run Menu

Only available when your program is running, the Run menu provides a central point of control for running, stopping, and stepping through your program.  The Run menu replaces the Project menu at run time and remains available until you stop execution.


Runtime

The time when your program is running.  At runtime, you can interact with your program like a user.  You can pause the application and start debugging by pressing CONTROL+BREAK.


Scope

Defines the visibility of a variable, or method.  For example, a variable declared as Public is visible to all procedures in all modules.  Variables declared in methods are visible only within the method and lose. their value between calls unless they are declared Static.


Source pane

An interface element in the Source window and in the Class Browser that allows you to view and edit code.


Source Window

Where all text editing is performed on your source code.


Standard component

This component acts as the reference point when a group of components is being aligned or sized.  When you select multiple components, the last component selected is the standard; it has distinct, colored selection handles.


Template
Project Template

A collection of objects that you can use as the base of your application or applet. When you select a template for a new project, the new project inherits all of the template's objects.

Types of project templates that you might create include web site projects, single document projects, database projects, applets, and component projects.


Thread

A path of execution in a running application.  You can create threads in your application code which can handle background processes, for example, that execute without the user’s notice.


Thread Window

At run time, this window shows all the existing threads your program has created, and the state of each thread.


Variables Window

At run time, this window shows the variables that are active in the current context.  This window is only accessible in debug mode.  You can change the value of a variable at run time by editing its value in this window.


Debug Toolbar

Contains single-button shortcuts to: Start/Resume/Stop execution, Step Into/Over a Method, Toggle a Breakpoint, Watch a Variable.


View

A window that shows a particular type of information.  Visual Café has these global views: the Property Inspector, Class Browser, Palette, Output window, Breakpoints window, Watch window, Variables window, Threads window, and Call Stack window.

The Project window, Source window, and forms are not global views and are not saved to a workspace.


Visual object

A class defined by a set of properties, a visual element, a set of event methods and associated code, and an optional connection.

A visual object may contain components.

Forms, components, and applets are examples of visual objects.  You can customize the appearance of visual objects by changing their properties. You can customize their behavior by writing code.


Watch window

At run time, this window displays the value of a variable or expression you enter.  You can modify these values directly in this window.


Window

A basic class with almost no functionality that is used by instances of Frame. Windows have no title bar, no menu bar, and has no close box.


Workspace

The area in which the current window arrangement is saved. Your workspace is saved automatically while you work.


action event

The user action that causes this event is different for different objects.  For example, a check box component's the action event is triggered when the user clicks the check box, but for a list component, the action event is triggered when the user double-clicks an item in the list.

The following describes when the action event is triggered for different components.

Component	User Action

Checkbox	Occurs when the user clicks the component.

RadioButton
Occurs when the user clicks the component.

Choice	Occurs when the user changes the selection in the component.  This can happen when the user either expands the list and clicks a new selection, presses an up or down arrow key, or types a letter that changes the selection.

MenuItem	Occurs when the user picks a menu item.


click event

Occurs either when the user clicks a button component with the left or right mouse button, or when the user presses the SPACEBAR when a button component has the focus.

Comments

Typically, you bind a click event to a button or menu item to execute particular actions.  For the other types of components, use this event to trigger actions in response to a change in the control.  For example, you might change a picture that is displayed in an image component when the user changes the selection in a list box that contains the image names.

Note

In Visual Café a button's action method is mapped to the click event.


dblClick event

Occurs when the user double-clicks an item in a list box component.


enterHit event

Occurs when the user presses the ENTER key in a TextField component.


gotFocus event

Occurs when a component receives the focus.  A component receives focus either as the result of user action, like clicking the component, or as a result of executed code, for example the setFocus method.  A form receives the focus only when all visible controls are disabled.


keyAction event

The user has pressed an "action" key. These are special keys like F1 which typically invokes help.


keyActionRelease event

The user has released an "action" key. The key field contains one of the special values indicated in…


keyPress event

Occurs when the user presses a key while a component has the focus.


keyRelease event

This method occurs when the user releases a key while the component has the focus.


listDeselect event

An item in a list has been deselected.


listSelect event

An item in a list has been selected.


lostFocus event

Occurs when a component loses the input focus.


mouseDown event

This method is called when the mouse button is pressed when this component has focus.


mouseDrag event

Occurs when the user depresses the mouse button and moves the mouse inside a component. The drag events continue until a mouse up event occurs.

The user has moved the mouse with a button pushed. The ALT_MASK flag indicates that the middle button is being pushed. The META_MASK flag indicates that the right button is pushed.

Usage

public boolean object_mouseDrag ( Event evt, int x, int y ) ;

Part	Description

evt	The event that caused the action

x	The location of the mouse relative to the left edge of the component.

y	The location of the mouse relative to the top edge of the component.


mouseEnter event

This event occurs when the mouse first enters the component.

Usage

public boolean object_mouseEnter ( Event evt, int x, int y ) ;

Part	Description

evt	The event that caused the action

x	The location of the mouse relative to the left edge of the component.

y	The location of the mouse relative to the top edge of the component.


mouseExit event

This event is triggered when the mouse exits a component.

Usage

public boolean object_mouseExit ( Event evt, int x, int y ) ;

Part	Description

evt	The event that caused the action.

x	The location of the mouse relative to the left edge of the component.

y	The location of the mouse relative to the top edge of the component.


mouseMove event

Occurs when the user moves the mouse inside a component with the mouse button not pushed.


mouseUp event

Occurs when the mouse button is released inside this component.


scrollAbsolute event

Occurs when the user moves the scroll thumb in a scroll bar.


scrollLineDown event

Occurs when the user moves the scroll thumb down by clicking the scroll arrow.


scrollLineUp event

Occurs when the user moves the scroll thumb up by clicking the scroll arrow.


scrollPageDown event

Occurs when the user moves the scroll thumb down by a page by clicking in the scroll area between the scroll thumb and the scroll arrow.


scrollPageUp event

Occurs when the user moves the scroll thumb up by a page by clicking in the scroll area between the scroll thumb and the scroll arrow.


WindowDeiconify event

Occurs when the user restores the size of the window from an icon.


windowDestroy event

Occurs when the user closes a window.


windowExpose event

Occurs when the user makes a change in an application that makes a window visible.


windowIconify event

Occurs when the user minimizes a window to an icon.


windowMoved event

Occurs when the user moves a window.


loadFile event

A file loading event.


saveFile event

A file saving event.


getNumberOfImages method

Returns the number of images in the slide show.

Usage

object.getNumberOfImages ( ) ;

Object is an expression that evaluates to a slide show component.

Returns

This method  returns an integer value indicating the number of images in the slide show.

Tip

You can use this method to check to see if the current image is the last image in the slide show.  The number of the first image in the slide show is 1.


getDescription method

Gets the description of the image at a specified index.  This method returns a string value.

Usage

object.getDescription (int index ) ;

Part	Description

object	An expression that evaluates to a SlideShow component.

index	A integer expression that specifies the index of the image whose description you want to retrieve.

Returns

This method returns a string containing the description text at the index specified.


nextImage method

Advances to the next slide in a slide show component.  This method returns an integer value that specifies the index of the current image.  If the current image is the last in the slide show, the index remains the same and the slide show is not updated.

Usage

object.nextImage ( ) ;

Object is an expression that evaluates to a slide show component.

Returns

This method returns an integer value which specifies the index of the current image in the slide show.


previousImage method

Advances to the previous slide in a slide show component.  This method returns an integer value that specifies the index of the current image.  If the current image is the first in the slide show, the index remains the same and the slide show is not updated.

Usage

object.previousImage( ) ;

Object is an expression that evaluates to a slide show component.

Returns

This method returns an integer value which specifies the index of the current image in the slide show.


handleEvent method

This method is called when any event occurs inside this component.

Usage

public boolean handleEvent(Event evt)

The method returns true to indicate that it has successfully handled the action; or false if the event that triggered the actionshould be passed up to the component's parent.

The handleEvent method of Component determines the type of event, and calls one of the following methods, if appropriate:

action

gotFocus

keyDown

mouseEnter

mouseExit

mouseMove

mouseDrag

mouseDown

mouseUp

All the above methods are called with the event as their first argument. The action method is called with the arg field of the event as its second argument. The keyUp and keyDown are passed the key field of the event as its second argument. The six mouse methods are passed the x and y fields of the event as their second and third argument, respectively.

Parameters

nevt 	 the event


add method

Adds a specified component to a container.  This method needs to be called from the container object.  If no container is specified, the top-level container is assumed.

Usage

When adding a component to a container, you have the option of specifying the components place in the creation order and alternately, its location in the container's layout.  Use any one of the following syntax examples to add a component to a container:

object.add ( Component comp ) ;

object.add ( Component comp, int pos ) ;

object.add ( String name, Component comp ) ;

Part	Description

object	An optional object expression that evaluates to a container.  If an object is not specified, the container which has the focus is assumed to be object.

comp	An object expression that evaluates to the component to add to the container.

pos	The position, in the creation order, at which to insert the component.

name	A tag that evaluates to a value that is used to arrange the component in the container's layout.

Settings

The settings for pos are:

Value	Description

0 to n - 1	The position of the component in the creation order where n is the number of components in the container (including the component you are adding).  If this value is greater than the number of components in the container, IllegalArgumentException occurs and the add method does not complete.

-1	Specifies that the component should be added at the end of the creation order.

The valid settings for name are:

Value	Description

0 to n - 1	The position of the component in the creation order where n is the number of components in the container (including the component you are adding).  If this value is greater than the number of components in the container, IllegalArgumentException occurs and the add method does not complete.

Returns

If this method succeeds it returns thecomponent argument.  Otherwise, it returns an error.

Note

When you add a component to a container, you need to call the layout method in order to refresh the display to show the component.

remove

LayoutManager


addItem method
addItem method (Choice component)

public void addItem(String item)

Adds an item to this choice menu.

Parameters:

item - the item to be added

Throws

NullPointerException (I-§1.40)

If the item's value is equal to null.


bounds method

Returns the containing rectangle of this component.

Usage

object.bounds ( ) ;

Object is an expression that evaluates to a valid TextArea or TextField component.

Returns

This method returns a Rectangle data type. A Rectangle has these fields:

•	public int height

•	public int width

•	public int x

•	public int y

  Related Topics


countComponents method

public int countComponents()

Returns

the number of components in this container.

See Also:

getComponent (II-§1.11.6).


countItems method

public int countItems()

Returns

the number of menu items in this choice menu.

See Also:

getItem (II-§1.8.5).


disable method

Sets a value that makes a component unresponsive to user actions.

Usage

object.disable ( )

Object is an expression that evaluates to an object in the Applies To list.

  See Also


echoCharIsSet method

public boolean echoCharIsSet()

Returns

true if this text field has a character set for echoing; false otherwise.

  Related Methods


enable method

Determines whether or not a control can receive input from a user.  When a control is disabled, it appears greyed and cannot be manipulated by the user.

Usage

object.Enable ( [ boolean ] ) ;

The Enabled property syntax has these parts:

Part	Description

object	An expression that evaluates to an object in the Applies To list.

boolean	An optional Boolean expression specifying whether object can respond to user-generated events, as described in Settings.

Settings

The settings for boolean are:

Setting	Description

true	(Default) Allows a component to respond to events.

false	Prevents a component from responding to events.

  Related Topics


getAlignment method

Gets the alignment setting for a component.

Usage

object.getAlignment ( )

Object is an expression that evaluates to an component in the Applies To list.  If object is omitted, the form associated with the active class is assumed to be object.

Returns

An integer which evaluates to one of three alignment constants.

Constant	Description

CENTER	Indicates that the label should be centered.

LEFT 	Indicates that the label should be left justified.

RIGHT 	Indicates that the label should be right justified.

  See Also


getBackground method

Gets the background color of a component. If the component has not specified a background color using the setBackground method, the background color of its parent component is returned.

Usage

object.setBackground ( color c );

Part	Description

object	An object expression that evaluates to an object in the Applies To list.  If object is omitted, the form associated with the active form module is assumed to be object.

c	A expression that evaluates to a color.

Note

Color is an integer value where the red element is in bits 16-23 of the argument, the green element is in bits 8-15, of the argument, and the blue element is in bits 0-7. The value 0 indicates no contribution from the primary color component.

  See Also


getCheckboxGroup method

Returns the group for a particular checkbox component.

Usage

object.getCheckboxGroup ( ) ;

The object element is an expression that evaluates to a valid TextArea or TextField component.

Returns

A CheckboxGroup, or null if the checkbox component is not part of a check box group.

  See Also


getComponent method

public Component getComponent(int n)

Parameters:

n - the index of the component to get

Returns:

the nth component in this container.

Throws

ArrayIndexOutOfBoundsException (I-§1.25)

If the nth value does not exist.


getComponents method

public Component[] getComponents()

Returns an array of all the component in this container.


getCurrent method

Returns the check box in this check box group that is currently checked, or null if none of the check boxes in the group is checked.

Usage

Checkbox getCurrent ( ) ;

Applies To

checkboxgroup component


getEchoChar method

Returns the echo character for a component.

Usage

object.getEchoChar ( ) ;

The object element is an expression that evaluates to a valid TextArea or TextField component.

Note

Before calling this method, call echoCharIsSet to make sure the component is using echoing.

  See Also


getFont method

Returns the font used in a component.  If this component has not yet specified a font using the setFont method, the font of its parent component is returned.

public Font getFont()


getForeground method

Determines the foreground color of this component. If this component has not specified a background color using the setForeground method, the background color of its parent component is returned.

Usage

object.getForeground ( ) ;

The object element is an expression that evaluates to a valid TextArea or TextField component.

Returns

the foreground color of this component.

  See Also


getItem method

public String getItem(int index)

Parameters:

index - the index

Returns:

the string at the specified index in this choice menu

See Also:

countItems (II-§1.8.4).


getLabel method

Returns a string that matches the label of a specified component, or null if the component has no label.

Usage

object.getLabel ( )

The object element is an expression that evaluates to a valid TextArea or TextField component.

Returns

A string expression or null if there is no label

  See Also


getLayout method

public LayoutManager getLayout()

Returns:

the layout manager for this container.

See Also:

layout (II-§1.11.11)

setLayout (II-§1.11.22).


getParent method

Returns the parent of this component.

object.getParent ( ) ;


getSelectedIndex method

public int getSelectedIndex()

Returns:

the index of the currently selected item in this choice menu.

See Also:

getSelectedItem (II-§1.8.7).


getSelectedItem method

public String getSelectedItem()

Returns:

a string representation of the currently selected item in this choice menu.

See Also:

getSelectedIndex (II-§1.8.6).


getSelectedText method

Gets the selected text in a text component.

Usage

object.getSelectedText ( ) ;

The object element is an expression that evaluates to a valid TextArea or TextField component.

  Related Topics


getSelectionEnd method

Gets the end position of a text selection within a text component.

Usage

object.getSelectionEnd ( ) ;

  Related Topics


getSelectionStart method

Returns the start position for text selected in a text component.

Usage

object.getSelectionStart ( ) ;

The object element evaluates to a valid TextArea or TextField component

  Related Topics


getState method

Determines if this check box is checked or unchecked.

Usage

object.getState ( ) ;

The object element represents a checkbox component.

Returns

The state of a check box.

Value	Description

true 	The check box is checked.

false	The check box is not checked.

  See Also


getText method

Returns the text in a text component.

Usage

object.getText ( ) ;

The object element evaluates to a valid TextArea or TextField component

  Related Topics


hide method

Hides this component. The component continues to exist and be in its containing object, but it is not visible and does not have any space allocated for it.

Usage

object.hide ( )

Part	Description

object	An object expression that evaluates to an object in the Applies To list.  If object is omitted, the form associated with the active form module is assumed to be object.

  See Also


insets method

public Insets insets()

Determines the insets of this container, which indicate the size of the container's border.

A Frame, for example, has a top inset that corresponds to the height of the frame's title bar.

The insets method of Container calls the insets method (II-§3.7.1) of this container's peer, if the container has a peer.

Otherwise it returns the inset new Inset(0, 0, 0, 0), which indicates that the container has no border.

Returns:

the insets of this container

See Also:

LayoutManager (II-§1.43).


inside method

public boolean inside(int x, int y)

Determines if the specified  location is inside this component.

The inside method of Component returns true if the  location is inside the bounding box (II-§1.10.3) of the

component.

Parameters:

     x - the x coordinate

     y - the y coordinate

Returns:

     true if the specified  location lies within this component; false otherwise.

See Also:

     locate (II-§1.10.37).


invalidate method

public void invalidate()

Invalidates this component. This component is marked as having changed. The next call to the validate method on this component or its parent(s) causes the component to be laid out again.

See Also:

layout (II-§1.10.33)

LayoutManager (II-§1.43).


isEditable method

Tests to see if the text in a text box is editable.

Usage

object.isEditable ( )

Part	Description

object	An object expression that evaluates to an object in the Applies To list.  If object is omitted, the form associated with the active form module is assumed to be object.

Returns

This methods returns a boolean value indicating whether or not the text is editable.

Value 	Description

true	The text component is editable.

false 	The text component is read-only.


isEnabled method

Returns a boolean indicating whether this component is enabled to receive events.

Usage

bool = object.isEnabled ( )

Settings

The following values applet to bool.

Value	Description

true	The component is enabled and can respond to events.

false	The component cannot respond to events.

Note

A component is disabled by calling its disable method. A component is enabled by calling its enable method.

  Related Info


isValid method

public boolean isValid()

Indicates whether this component is valid. A component is valid if it has a peer and it and its subcomponents have been properly laid out.

Returns:

true if this component is valid; false otherwise.

See Also:

validate (II-§1.10.75)

invalidate (II-§1.10.26).


isVisible method

Indicates whether this component is visible. Except for top-level components such as a frame, components are visible unless they have been specifically been made invisible by a call to the hide method (II-§1.10.23).

Usage

object.isVisible ( )

Part	Description

object	An object expression that evaluates to an object in the Applies To list.  If object is omitted, the form associated with the active form module is assumed to be object.

Returns

true	The component is visible.

false	The component is not visible.

  See Also


layout method

public void layout()

Lays out this container.

The layout method of Container calls the layoutContainer method (II-§1.43.2) of the container's layout manager.

Most applications do not call this method directly. This method is called when a container calls its validate method.

Overrides:

layout in class Component (II-§1.10.33).

See Also:

 setLayout (II-§1.11.22).


list method

public void list(PrintStream out, int indent)

Prints a listing of this container to the specified output stream. The listing starts at the specified indentation.

The list method of Container prints itself by calling its superclass's list method (II-§1.10.36) and then calls list on each of its subcomponents with and indentation of .

Parameters:

out - a print stream

indent - the number of spaces to indent

Overrides:

list in class Component (II-§1.10.36).


locate method

public Component locate(int x, int y)

Determines the component or subcomponent of this container that contains the  coordinate. This method only looks one level deep. If the point  is inside a subcomponent that itself has subcomponents, it does not go looking down the subcomponent tree.

The locate method of Container first determines if the  coordinate is inside (II-§1.10.25) its own boundaries. If not, it returns null immediately. If the coordinate is inside its boundaries, it calls inside (II-§1.10.25) on each of the subcomponents; if any of those calls to returns true, that subcomponent is returned; otherwise the container target object is returned.

Parameters:

x - the x coordinate

y - the y coordinate

Returns:

this container or one of its subcomponent that contains the  coordinate; null if the coordinate is outside this container.

Overrides:

locate in class Component (II-§1.10.37).


location method

public Point location()

Returns:

the location of this component in its parent's coordinate space.

See Also:

move (II-§1.10.47).


minimumSize method

public Dimension minimumSize()

Determines the minimum size of this container.

The minimumSize method of Container checks to see if this container has a layout manager (II-§1.11.9). If so, its minimumLayoutSize method (II-§1.43.3) is called. Otherwise, its superclass's minimumSize method (II-§1.10.40) is called.

Returns:

the minimum size of this container.

Overrides:

minimumSize in class Component (II-§1.10.40).

See Also:

preferredSize (II-§1.11.17).


move method

Moves this component to the specified coordinates. The move method positions a component relative to the top-left corner of the container (parent) component.

Usage

Use this syntax to move a component to a specific location within its container:

object.move ( int x, int y ) ;

Part	Description

x	The distance, in pixels, of the component's left edge from the left edge of the container.

y	The distance, in pixels, of the component's top edge from the top edge of the container.

Related Topics

location

reshape


nextFocus method

public void nextFocus()

Moves the input focus to the next component, as determined by the component's peer (II-§3.6.14).

See Also:

requestFocus (II-§1.10.63)

gotFocus (II-§1.10.21).


paint method

public void paint(Graphics g)

Paints this component. Most application components, including applets, override this method.

The paint method of Component calls the repaint method (II-§3.6.19) of this component's peer.

The coordinate of the graphics context is the top-left corner of this components. The clipping region of the graphics context is the bounding rectangle of this component.

The paint method of Component calls the repaint method (II-§3.6.19) of this component's peer.

Parameters:

g - the graphics context to use for painting

See Also:

update (II-§1.10.74).


paintAll method

public void paintAll(Graphics g)

Paints this component and all of its subcomponents.

The coordinate of the graphics context is the top-left corner of this component. The clipping region of the graphics context is the bounding rectangle of this component

Parameters:

g - the graphics context to use for painting

See Also:

paint (II-§1.10.49).


paintComponents method

public void paintComponents(Graphics g)

Paints each of the components in the container.

Parameters:

g - the graphics context

See Also:

paint in class Component (II-§1.10.49)

paintAll in class Component (II-§1.10.50).


paramString method

protected String paramString()

Returns the parameter string representing the state of this component. This string is useful for debugging.

Returns:

the parameter string of this component.


preferredSize method

public Dimension this()

Determines the preferred size of the component.

The preferredSize method of Component checks to see if this component has a peer (II-§1.10.19). If so, the preferredSize request is passed to the peer (II-§3.6.16). Otherwise, the preferred size is the width and height specified by the most recent reshape (II-§1.10.64) or resize (II-§1.10.65) method call.

Returns:

the preferred size of this component.

See Also:

minimumSize (II-§1.10.40)

LayoutManager (II-§1.43).


printComponents method

public void printComponents(Graphics g)

Prints each of the components in this container.

Parameters:

g - the graphics context

See Also:

print in class Component (II-§1.10.56)

printAll in class Component (II-§1.10.57).


remove method

Removes the specified component from this container. This method also causes the component to call its

Usage

public void remove(Component comp)

removeNotify method (II-§1.10.58) to remove its peer.

Parameters:

comp - the component to be removed

See Also:

add (II-§1.11.1).


removeAll method

public void removeAll()

Removes all the components from this container. This method also causes all the components in the container to call their removeNotify method (II-§1.10.58) to remove their peers.

See Also:

add (II-§1.11.1)

remove (II-§1.11.19).


removeNotify method

public void removeNotify()

Notifies this container and all its subcomponents to destroy their peers.

Overrides:

removeNotify in class Component (II-§1.10.58).

See Also:

addNotify (II-§1.11.4).


requestFocus method

Requests that the component get the input focus. If this method is successful, the component's gotFocus event is triggered.

Usage

object.requestFocus ( ) ;

The object element is a component that can receive focus.

Notes

•	This method can only move focus to a visible form or component.

•	Focus can't be moved to a form or component if the Enabled property is set to false. To set focus to an object that is disabled, you must first call the component's enable method.

  Related Topics


reshape method

Reshapes this component to the specified bounding box in its parent's coordinate space. Components that are in a container with a layout manager should not call this method explicitly.

Usage

object.reshape(int x, int y, int width, int height ) ;

Part	Description

x 	The location of the left side of the component.

y 	The location of the top of the component.

width 	The width of the component.

height 	The height of the component.

  Related Topics


resize method

Resizes this component using the specified width and height arguments. Components that are in a container with a layout manager should not call this method explicitly.

Usage

When using the resize method, you can use either of the following:

object.resize ( Dimension d ) ;

object.resize ( int width, int height ) ;

Part	Description

d 	The new dimension for the component.

width 	The width of the component.

height 	The height of the component.

Note

The dimension type consists of these fields:

•	public int height

•	public int width

  Related Topics


select method

Selects text in a text component beginning and ending the selection at specified locations.

Usage

object.select ( int selStart, int selEnd ) ;

Part	Description

object	An object expression that evaluates to a TextArea or TextField component.

selStart	An integer expression specifying the starting point for the selected text.

selEnd	An integer expression specifying the ending point for the selected text.

Errors

Error conditions.


selectAll method

Selects all the text in this text component.

Usage

object.SelectAll ( ) ;

The object expression evaluates to a TextField or TextArea component.


setAlignment method

Sets the alignment for this label to the specified alignment.

Usage

object.setAlignment ( int alignment )

Part	Description

object	An object expression that evaluates to an object in the Applies To list.  If object is omitted, the form associated with the active form module is assumed to be object.

alignment	An integer expression or a constant which evaluates to a valid alignment setting.

Settings

An integer constant.

Constant	Description

CENTER	Indicates that the label should be centered.

LEFT 	Indicates that the label should be left justified.

RIGHT 	Indicates that the label should be right justified.

Errors

If an improper alignment is given, an error occurs when you compile the program: IllegalArgumentException.

  See Also


setBackground method

Sets the background color of this component.

Usage

object.setBackground ( Color c )

The setBackground method of Component calls the setBackground method (II-§3.6.23) of the component's peer.

Parameters

c - the color

  See Also


setCheckboxGroup method

Sets the group of this check box to be the specified check box group. If this  check box is already in a different check box group, it is first taken out of that group.

Usage

object.setCheckboxGroup ( CheckboxGroup chkGroup)

Part	Description

object	An object expression that evaluates to an object in the Applies To list.  If object is omitted, the form associated with the active form module is assumed to be object.

chkGroup	A new check box group, or null to remove the check box from any check box group.

  See Also


setCurrent method

If the indicated check box argument belongs to this check box group, this method sets that check box to be "on", and all other checkboxes in this group to be "off"

If the check box argument is null or belongs to a different check box group, then this method does nothing.

Usage

object.setCurrent ( Checkbox box ) ;

Part	Description

object	An expression that evaluates to a checkbox group.

box 	A variable name that identifies the Checkbox component you want to check.

Applies To

checkboxgroup component


setEchoCharacter method

Sets the character which is displayed in the text field as the user enters text.  An echo character is useful for fields where the user input should not be shown such as in the case of a text field for typing in a password.

Usage

object.setEchoCharacter ( char echoChar )

Part	Description

object	An object expression that evaluates to an object in the Applies To list.  If object is omitted, the form associated with the active form module is assumed to be object.

echoChar	A single character to display when the user enters text into the component.


setEditable method

Makes text in a text box either editable or read only.

Usage

object.setEditable ( boolean bool )

Part	Description

object	An object expression that evaluates to an object in the Applies To list.  If object is omitted, the form associated with the active form module is assumed to be object.

bool	A boolean expression.  When this parameter is true, the text component becomes editable. If false, the user cannot change the text of this text component.

Note

If you want to check to see if a text component is editable or read only, use the isEditable method.

  How?


setFont method

Sets the font to use to display text in a component.

Usage

public void setFont ( Font f ) ;

f - the font

See Also:

getFont


setForeground method

Sets the foreground color of this component.

The setForeground method of Component calls the setForeground method (II-§3.6.25) of the component's peer.

Usage

object.setForeground ( Color c )

Part	Description

object	An object expression that evaluates to an object in the Applies To list.  If object is omitted, the form associated with the active form module is assumed to be object.

c	A expression that evaluates to a color.

  See Also


setLabel method

Sets the text that appears in a component.  Use setLabel to set the text that appears as the caption of a button, for example.

Usage

object.setLabel ( string sLabel )

Part	Description

object	An object expression that evaluates to an object in the Applies To list.  If object is omitted, the form associated with the active form module is assumed to be object.

sLabel	A string that evaluates to the text displayed as the component’s label, or null for no label

Comments

When you create a new object, its default caption is the default Name property setting.  This default caption includes the object name and an integer, such as Button1 or Form1.  For a more descriptive label, set the Label property.

Tip

For a label, set the Preferred Size property to true to automatically resize the control to fit its label.

  Related Topics


setLayout method

public void setLayout(LayoutManager mgr)

Sets the layout manager for this container.

Parameters:

mgr - the new layout manager

See Also:

layout (II-§1.11.11)

getLayout (II-§1.11.9).


setState method

Sets the check box to the specified boolean state: true indicates "on"; false indicates "off".

Usage

object.setState ( boolean state )

Part	Description

object	An object expression that evaluates to an object in the Applies To list.  If object is omitted, the form associated with the active form module is assumed to be object.

state	A boolean indicating the check box state.  When this parameter is true, a check mark appears in the check box.  If state is false, the component is unchecked.

  Related Topics


setText method

Sets the text of this text component to a specified string.

Usage

Use this syntax to set the text in a TextArea or TextField component.

object.setText ( String t ) ;

Part	Description

object	An expression that evaluates to a TextArea or TextField component.

t 	The new text to display in the component.

  Related Topics


show method

Shows a component; if this component had been made invisible by a call to the hide method makes this component visible again.

Usage

object.show ( [ boolean cond ] )

Part	Description

object	An object expression that evaluates to an object in the Applies To list.  If object is omitted, the form associated with the active form module is assumed to be object.

cond	A optional boolean expression. When this parameter is true the component is made visible; When false, the component is hidden.

  Related Topics


size method


validate method

public void validate()

Validates this container and all of its subcomponents. The AWT uses this method to have a container be laid out again after adding or otherwise changing the components it contains.

Overrides:

validate in class Component (II-§1.10.75).

See Also:

invalidate in class Component (II-§1.10.26).


isShowing method

A component is showing if it is both visible and is inside a container this is both visible and showing.

Usage

object.isShowing ( ) ;

Object is an expression that evaluates to an item in the Applies To list.

Returns

This method returns a boolean value:

value	description

true	The component is showing.

false	The component is not showing.

Note

A component is hidden by calling its hide method. A component is made visible by calling its show method.


Alignment property

Sets the alignment for text in a label component, either left, right, or center aligned.

Settings

The settings you can choose from are:

Value	Description

LEFT	(Default)  Text is left aligned in the component.

CENTER	Text is centered between the right and left edge of the component.

RIGHT	Text is aligned to its right edge of the component.


Alignment property (Layout properties)
Alignment property

Sets the alignment for components within a container.  This property is inaccessible unless the container is using a flow layout.

Settings

The settings you can choose from are:

Setting	Description

LEFT	The component is aligned at the left edge of the container.

CENTER	(Default.)  The component is centered within the container.

RIGHT	The component is aligned at the right edge of the container.


Anchor property

Determines where, within a component's display area, to place the component. This setting is used when a component is smaller than its display area.

The Anchor property is inaccessible unless a component is inside a container which uses a grid bag layout.

Access this property by setting the Layout property in the property inspector window to ‘Layout’ and then choosing GridBagConstraints’.

Settings

Valid values are the following:

Constant	Value	Description

CENTER 	10 	Puts the component in the center of its display area.

EAST 	13 	Puts the component on the right side of its display area, centered vertically.

NORTH 	11	Puts the component in the top of its display area, centered horizontally

NORTHEAST	12	Puts the component in the top right corner of its display area.

NORTHWEST	18 	Puts the component in the top left corner of its display area.

SOUTH 	15 	Puts the component in the bottom of its display area, centered horizontally

SOUTHEAST	14	Puts the component in the bottom right corner of its display area.

SOUTHWEST	16 	Puts the component in the bottom left corner of its display area.

WEST	17	Puts the component on the left side of its display area, centered vertically.


Background property

Sets the color displayed for the background of a component. At run time you can change background or foreground colors using the setBackground or setForeground method, respectively.

To set a custom color, choose Custom from the drop-down in the Property Inspector and choose a color from the color palette.

All visual components and containers use the background property.

Settings

The color settings are:

Value	Description

black	Makes the component text black.

blue	Makes the component text blue.

cyan	Makes the component text cyan.

darkGray	Makes the component text dark gray.

gray	Makes the component text gray.

green	Makes the component text green.

lightGray	Makes the component text light gray.

magenta	Makes the component text magenta.

orange	Makes the component text orange.

pink	Makes the component text pink.

red	Makes the component text red.

white	Makes the component text white.

yellow	Makes the component text yellow.

Note

At run time you can change background or foreground colors using the setBackground or setForeground method, respectively.


Bottom property
Insets property

Sets the minimum amount of space between a component and the edges of its display area.  This property is only accessible if the component's container is using the grid bag layout.

Access this property by setting the Layout property in the property inspector window to ‘Layout’ and then choosing GridBagConstraints’.

Top

The inset from the top of the display area.

Left

The inset from the left of the display area.

Bottom

The inset from the bottom of the display area.

Right

The inset from the right of the display area.

Settings

The setting for Top, Left, Right, and Bottom are:

Value	Description

0	(Default.)  Specifies no offset from the edge of the display area.

n	A positive number value.


Checkbox property

Determines whether or not a menu item behaves like a check box.  When this property is true, the menu item behaves like a checkbox and when a users selects the menu item, its state is toggled between checked and unchecked.

Settings

The settings for Checkbox are:

Value	Description

true	(Default.)  The menu behaves like a check box.  When selected, the state of the checkbox toggles from checked to unchecked, and from unchecked to checked.

false	The menu item does not behave like a check box.


Class property

Indicates the Java package and class name for the class defining the current component.  All visual components and containers use this property.


Columns property

  Related Topics

Specifies the number of columns in a container that uses a grid layout.

Settings

Value	Description

0 (zero)	Any number.  The Columns property can only be set to zero if the Rows property is non-zero.

1 to MAX_VALUE	An integer indicating the number of columns to display in a grid layout.


Columns property

Sets the number of columns in a text component.

TextArea and TextField components use this property.


Default Directory property

Sets the initial file directory for a file dialog.


Default File Name property

Sets the default file name for a File dialog.


Dimensions property
Dimensions properties

A Sets the position and size of a component.  This property is broken down into X, Y, Height and Width properties.

All visual components and containers support the Dimensions properties.

At run time, you can change the dimensions of a component by calling the reshape method.

X Property

Sets the distance between the left edge of a component and the left edge of its container.

Y Property

Sets the distance between the top of a component and the top of its container.

Height Property

Sets the distance of a component’s bottom edge from its top edge.

Width Property

Sets the distance of a component’s right edge from its left edge.


Echo property

When this property is not empty, the character specified appears in the text component as the user types text.  This property is useful for password fields, for example, where you don’t want the characters the user enters to display on the screen.

The TextField component supports the echo property.

To turn echoing off, remove the text from this property.

Settings

You can use any single alphanumeric character as the echo character.


Editable property

Determines whether the user can edit text displaying in a TextField or TextArea component.

The TextComponent and Textfield components support this property.

Settings

Value	Description

true	(Default) The user can edit text in the component.

false	The text in the component is read only.

Notes

You can change this property at run time using the setEditable method.


Enabled property

Enables or disables a component. When this property is true, the component is enabled.


Fill property

Enabled when the component's display area is larger than the component's requested size. It determines whether (and how) to resize the component, and resizes the component according to the settings listed below.

Access this property by setting the Layout property in the property inspector window to ‘Layout’ and then choosing GridBagConstraints’.

Settings

Constant	Value	Description

NONE	0	(Default.)  The component is not resized.

BOTH	1	Makes the component fill the display area, vertically and horizontally.

HORIZONTAL
2	Makes the component wide enough to fill its display area horizontally. The component's height is unchanged.

VERTICAL	3	Makes the component tall enough to fill its display area vertically. Does not affect the width of the component.


Font property

Determines the font for a component.  In Visual Café, this property is broken into sub properties.

All visual components and containers support this property.

Bold property

Sets component text to bold.  False sets component text to plain. Access through the ‘style’ property label.

Italic property

Sets component text to italicized. False sets component text to plain. Access through the ‘style’ property label.

Name property

Specifies the name of the font used to display text within a component. The pulldown menu lists available fonts. To set the current font to match the parent font, choose ‘Parent.’

Size property

Sets the font size in points.


Foreground property

Sets the color used to display text in a component.  You can select a Java color, or choose a custom color from the color palette.  To select a custom color, select ‘Custom’ from the list of values.

All visual components and containers support this property.

At run time you can change background or foreground colors using the setBackground or setForeground method, respectively.

Settings	Description

black	Makes the component text black.

blue	Makes the component text blue.

cyan	Makes the component text cyan.

darkGray	Makes the component text dark gray.

gray	Makes the component text gray.

green	Makes the component text green.

lightGray	Makes the component text light gray.

magenta	Makes the component text magenta.

orange	Makes the component text orange.

pink	Makes the component text pink.

red	Makes the component text red.

white	Makes the component text white.

yellow	Makes the component text yellow.


Grid Bag Constraints properties (Conditional)
Grid Bag Constraints properties

Determines how a component is laid out inside a container that uses a grid bag layout.  This property is not available unless the Layout property for the component's container is set to GridBagLayout.

The GridBagConstraints property supports visual components, not containers; but containers must have their layout property set to GridBagLayout.

GridBag Constraints are a set of properties that determine how a visual component set into a Container supporting a GridBag layout manager will grow, shrink or reposition itself; based on how its container has been resized.  All GridBagConstraint components can have separate GridBagConstraint settings.  This means that unforeseen size and boundary conflicts between components can arise if your GridBagComponent Container assumes certain sizes and dimensions.  You must manually test your component layout design, to determine that all components within a Container behave appropriately.

The properties for components within a grid bag layout are:

Anchor

Fill

Grid

Insets

Internal Pad X

Internal Pad Y

Weight X

Weight Y


Grid property

These properties specify the characteristics of the a component's display area within a grid bag layout.

Access this property by setting the Layout property in the property inspector window to ‘GridBagLayout’ and then choosing GridBagConstraints’.

X property

Sets the cell where a component's display area begins.  The leftmost cell has gridx = 0.

Y property

Specifies the cell number at the top of the component's display area.  The topmost cell has gridy = 0.

Width property

Specifies the number of cells in a row to use for the component's display area.

Height property

Specifies the number of cells in a column to use for the component's display area.

Use GridBagConstraints.REMAINDER to specify that the component be the last one in its column. Use      GridBagConstraints.RELATIVE to specify that the component be the next to last one in its column.

Settings

The settings for X are:

Value	Description

-1	(Default.)  Places the component immediately to the right of the component that was added to the container just before this component was added.

n	An integer expression specifying the cell number where the left side of a component's display area begins.

The settings for Y are:

Value	Description

-1	(Default.)  Places the component below the component that was added to the container just before this component was added.

x	An integer expression specifying the cell number where the top of a component's display area begins.

The settings for Width are:

Value	Description

1	(Default.) Specifies that the component use the space remaining in its column for its display area.

w	An integer expression that specifies the width of the display area, in columns.

The settings for Height are:

Value	Description

1	(Default.)  Specifies that the component use the last cell in its column as its display area.

h	An integer expression that specifies the width of the display area, in rows.


Group property

  Related Topics

Specifies a named check box group to which to add the check box component.  If the check box group does not already exist, Visual Café creates a CheckboxGroup with the name specified.

When the group property is not empty, the Checkbox behaves like a radio button.  That is, only one of the components in the check box group can be "on" at a time.

The RadioButton and CheckBox components support the Group property.

Setting

The setting for Group must be a valid variable name.


Help Menu property

Specifies the Menu component in a menu bar which is the Help menu.


Inherit Background property

Determines where a component gets its background color setting.

All components and containers support this property.

Settings

The possible settings are:

Value	Description

true	(Default.)  The component uses the background color in its parent container's Background property.

false	The component uses its own Background property.


Inherit Font property

Determines where a component gets its font setting.

All visual components and containers support this property.

Settings

The possible settings are:

Value	Description

true	(Default.)  The component uses the font set in its parent container's Font property.

false	The component uses its own Font property.


Inherit Foreground property

Determines where a component gets its foreground color setting.

All components and containers support this property.

Settings

The possible settings are:

Value	Description

true	(Default.)  The component uses the foreground color in its parent container's Foreground property.

false	The component uses its own Foreground property.


Insets property

Specifies the external padding for a component whose container uses a grid bag layout.  The insert is the minimum amount of space between the component and the edges of its display area.

Access this property by setting the Layout property in the property inspector window to ‘Layout’ and then choosing GridBagConstraints’.

Top property

The amount of space between the edge of the display area and the top of a component.

Left property

The amount of space between the edge of the display area and the left edge of a component.

Bottom property

The amount of space between the edge of the display area and the bottom of a component.

Right property

The amount of space between the edge of the display area and the right edge of a component.

Settings

The settings for Inset properties are:

Value	Description

0	(Default.)  Specifies that there is no space between the edge of a component and the edge of its display area.

n	A integer expression that sets the number of pixels between the edge of a component and the edge of its display area.  For example, setting a component's  Top property to 10, means that the top of the component is 10 pixels from the top of its container.


Internal Pad X property

Specifies the amount of space to add to the minimum size of the component to determine its overall width.  This property is inaccessible unless a components is inside a container which uses a grid bag layout.

Access this property by setting the Layout property in the property inspector window to ‘Layout’ and then choosing GridBagConstraints’.

Settings

The settings for Internal Pad X are:

Value	Description

0 (zero)	(Default.)  Specifies that the component's display at its minimum width.

n	An integer expression that specifies the number of additional pixels to add to the minimum width of the component.  Note, the width of the component is at least its minimum width in pixels plus twice its Internal Pad X property.


Internal Pad Y property

Specifies the amount of space to add to the minimum size of the component to determine its overall height.  This property is inaccessible unless a components is inside a container which uses a grid bag layout.

Access this property by setting the Layout property in the property inspector window to ‘Layout’ and then choosing GridBagConstraints’.

Settings

The settings for Internal Pad Y are:

Value	Description

0 (zero)	(Default)  Specifies that the component's display at its minimum height.

n	An integer expression that specifies the number of additional pixels to add to the minimum height of the component.  Note, the width of the component is at least its minimum height in pixels plus twice its Internal Pad Y property.


Items property

Controls the items that appear in the list portion of a Choice or List component.  To create a new line item, press CONTROL+ENTER and type a line of text.

The List and Choice visual components support the Items property.

Note

At run time, use the Choice component's additem method to add items to the component.


Label property

Sets the text that appears in a component.

The button component supports the label property, which is really a label component.

Settings

The setting for Label is any string expression including all alphanumeric characters.


Layout property

Sets the layout to use to arrange components within a container.

Remarks

Containers are objects that contain other objects in some specified order, like a linked list or binary tree— or sorted according to some key.  In Java, the Layout Manager is the interface that defines the order in which a container will hold visual components.  The Java language provides five predefined layout components, which you add to a container as if they were visual components.  In addition, you can write your own layout component, provided your component supports the Layout Manager interface.

To specify a layout manager in code, you instantiate a container object; and then instantiate and add the layout object to that container object immediately, and before you instantiate and add any visual components to that container.  You then must instantiate, configure and add each visual component in the order that places your components where you want them in your container.

If this all seems complicated—well it can be.  Visual Café simplifies the layout process by creating a “layout property” on the Property Inspector window for your container. This lets you select or change the layout manager with the click of a mouse button, at any time during your GUI design process.  You set the ‘Layout’ property, and then drag and drop components onto the Forms Designer window.

The following containers support layout properties:  Frame, pane, applet, window, dialog.

Settings

Value	Description

None	Positions and sizes components within a container precisely where you place and size them.

BorderLayout
Positions and sizes components within a container using North, South, East, West, and Center orientations.  To specify where a component appears within the layout, set the component's Place property

The North and South components stretch horizontally; the East and West components stretch vertically; the Center component may stretch both horizontally and vertically to fill any remaining space. You need to modify the component size and placement within the border layout pane.

BorderLayout is the default layout manager for applications.

CardLayout
Contains several 'cards'. Only one card is visible at a time, allowing you to flip through the cards. Each card supports its own layout manager.

FlowLayout
Arranges components left to right until no more components fit on the same line, and then moves to the next line. Each line is centered. You need to modify the component size and placement within the flow layout line. FlowLayout is the default layout manager for applets.

GridBagLayout
Aligns components vertically and horizontally, without requiring that the components be the same size.  Each row and column in a GridBagLayout can expand to hold its largest component, and pack to conserve space relative to bordering cells-- much as table rows and columns expand to hold their largest cells.

GridBagLayout manages a rectangular grid of cells, with each component occupying one or more cells  (called its display area).

Components within the GridBagLayout are positioned based on their GridBagConstraint properties. You also need to carefully test GridBagConstraints properties for each component displaying in a GridBagLayout Container, to determine that each component expands, shrinks and repositions itself appropriately, relative to other components in the container.

GridLayout
A layout manager that divides a container into rows and columns of uniform rectangular cells.  The GridLayout can have a fixed number of rows, or columns, or both—but all cells maintain the same size.  After placing a component within a cell, you need to adjust the component size and position.

Note

At design time, when you change a container's Layout property, the properties of container's children change to allow you to specify how the component is arranged inside the container.


Line Increment property

Determines the line increment for a scrollbar component, which is the amount that is added or subtracted from this scroll bar's Value property when the user presses down or up scroll arrow.

The scrollbar component supports this property.


Main MenuBar property

Specifies the menu bar to display in a frame.  You can create more than one menu bar in a frame, but only one of them can be displayed at a time.

Settings

Value	Description

true	The menu bar displays in the frame.

false	The menu bar is not displayed in the frame.

Note

At run time, you can display a different menu bar by calling the frame's setMenuBar method.


Maximum Value property

Sets maximum value of the scroll thumb when it is in its bottom or rightmost position of a scrollbar.

The scrollbar component supports this property.

Note

To set the position of the scroll thumb to it's maximum position, call the setValue method for the scrollbar and use the Maximum Value property setting as the parameter.


Minimum Value property

Sets minimum Value property setting when the scroll thumb is in its top or leftmost position of a scrollbar.

The scrollbar component supports this property.

Note

In code, you can  move the scroll thumb to it's minimum position by calling the setValue method for the scrollbar and use the Minimum Value property setting as the parameter.


Modal property

Determines whether or not a dialog is modal.  A modal dialog receives all user input while it is open.  To use another window, the modal dialog must first be dismissed.

Dialog containers support this property.

Settings

The Modal property settings are:

Value	Description

true	(Default.)  The dialog is modal.

false	The dialog is modeless.


Mode property

Determines whether the dialog will be used to save files or to locate and open files.

The SaveFile and OpenFile Dialog containers support this property.

Settings

The settings for Mode are:

Value	Description

SAVE	Creates a Save File dialog box that can be used to save a file.

FILE	Creates a File Open dialog box that the user can use to locate and open a file.


Multiple Selections property

Determines whether or not a list allows multiple selections.

The List component supports this property.

Settings

The property settings are:

Value	Description

true	The list box allows multiple selections.

false	(Default.)  The list box allows only a single selection at time.


Name property

Specifies the name to use to refer to a component in code.

All components and containers support this property.


Orientation property

Determines the orientation of a scroll bar.

The scrollbar component supports this property.

Settings

The settings for scroll bar orientation are:

Constant	Value	Description

HORIZONTAL
0	Specifies horizontal orientation for the scroll bar.

VERTICAL
1	Specifies horizontal orientation for the scroll bar.


Page Increment property

Determines the page increment of a scroll bar, which is the amount that is added to or subtracted from the component's Value when the user clicks the area between the scroll thumb and scroll arrow.

The scrollbar component supports this property.


Page Size property

The relative amount of the entire contents which is visible represented by the size of the scroll thumb in the scroll bar. The scroll bar uses this value when paging up or down by a page.

The scrollbar component supports this property.


Place property (Conditional)
Place property

Sets the placement for a component within its container.  This property is only accessible for components whose container is using the BorderLayout.

The scrollbar component supports this property.

Settings

The settings for Place are:

Value	Description

North	Places the component at the top of the container.

South 	Places the component at the bottom of the container.

East	Places the component along the right side of the container.

West	Places the component along the left side of the container.

Center 	Places the component in the center of the container, in the remaining space.

Notes

•	If necessary, a component whose placement is North or South is horizontally resized to the width of the container.  A component whose placement is East or West is vertically resized to the height of the container.

•	A string value other than one of those listed above is ignored.


Resizable property

Determines whether or not a frame or dialog component can be resized at run time.


Rows property

  Related Topics

Specifies the number of rows in a container that uses a grid layout.

Settings

Value	Description

0 (zero)	Any number.  The Rows property can only be set to zero if the Columns property is non-zero.

1 to MAX_VALUE	The number of rows to display in a grid layout.


Rows property

Sets the number of rows to display in the text area.

The TextArea component supports this property.


Selected Index property

Specifies the item in a Choice component that that is currently selected.

Settings

The settings for Index are:

Setting	Description

-1	Indicates that none of the list items is currently selected.

n	An integer value indicating the index of the selected item.  The first item in the list has an index of zero (0).


Separator property

Determines whether or not a menu item is a separator.  A separator displays as a solid line in the menu and cannot be selected at run time.

Note

The label "-" is reserved to mean a separator between menu items.  That is, if you add a menu item which uses "-" as a Label, it will behave like a menu separator.


State property

Specifies the state, on or off, of a check box or a radio button.

The checkbox and radiobutton components support this property.

Settings

The settings for State are:

Value	Description

true	The component is on, or checked.

false	(Default.)  The component is off, or not checked.


Tear Off property

Controls whether the menu can be torn off the menu bar or not.

Note

The Tear Off property cannot be changed at run time, this property is set when the menu is created.


Text property

Determines the text that appears in a TextArea or TextField component.

Usage

object.setText ( String t ) ;

The Text property syntax has these parts:

Part	Description

object	An object expression that evaluates to a TextArea or TextField component.

t	A string expression specifying the text appearing in the component.


Title property

Specifies the text to display in the title bar of a Dialog, FileDialog, or Frame component.


Use Preferred Size property

All visual components and containers support this property.


Value property

Sets the position of the scroll thumb in the scroll bar.


Visible property

Controls whether a component is visible at run time or not.  When this property is false, the component is invisible.

At run time, you can make components visible or invisible using the Show or Hide method, respectively.

All visual components and containers support this property.

Settings	Description

true	(Default) The component is visible.

false	The component is not visible.


Visible Rows property

Sets the number of rows to display in a list.  If there are more item in the list than the number of visible rows, a scroll bar is automatically added to the component.

Settings

Any valid integer expression.  The default value is 0 (zero).


Weight X property

Specifies how to distribute extra vertical space for a component within a grid bag layout. The weight of a row is calculated as the maximum weightx of all the components in a row.  If the resulting layout is smaller vertically than the area it needs to fill, the extra space is distributed to each row in proportion to its weight. A row that has weight 0 receives no extra space.

If all the weights are zero, all the extra space appears between the grids of the cell and the top and bottom edges.

Settings

The default Setting for the Weight X property is 0 (zero).  This setting can be any valid double expression.


Weight Y property

This field specified how to distribute extra horizontal space for components within a grid bag layout.  The weight of a column is calculated as the maximum weighty of all the components in a row.  If the resulting layout is smaller horizontally than the area it needs to fill, the extra space is distributed to each column in proportion to its weight. A column that has weight 0 receives no extra space.

If all the weights are zero, all the extra space appears between the grids of the cell and the right and left edges.

Settings

The default Setting for the Weight X property is 0 (zero).  This setting can be any valid double expression.


Plain property


Selection End property

Sets the end position for a selection in a text component.

Settings

Value	Description

0 (zero)

n


Selection Start property

Sets the start position for a selection in a text component.


URL property


visual objects
Visual Café components and containers

Visual Café lets you design Java applets and applications using a library of standard and third party objects, without writing source code.

In Java, the objects you use to create a visual interface are called components.  Components, in turn are placed into objects called containers, which determine how components will display.

For example, a Frame, is a container used to build a visual interface for an Application.  To build a Frame in Java, you extend a Frame class and instantiate that subclassed container class, and then instantiate and add component objects, like buttons, text boxes, and scroll bars, to your Frame container object.  This is a complex process.

Visual café simplifies this process.  In Visual cafe, you select to build an Application project from the New Project window, and then add components to your form designer window.  Visual Café does the rest for you.

Visual Café provides the following components and containers:

Applet	Menu
AboutDialog	MenuBar
AttentionDialogAttentionDialog	MenuItem
Button	ModalDialog
Canvas	Panel
Checkbox	RadioButton
CheckboxGroupCheckboxGroup component	Scrollbar
CheckboxMenuItem	SlideShow
Choice	TextArea
Component ClassComponent class	TextField
Container ClassContainer class	TextComponent
Date componentDate	Timer
DateField componentDateField	Scrollbar
Dialog	Window
FileDialog
Frame
Label
List


Applet component
Applet container

  Properties   [image]  Events

An applet is a program that a web browser launches and runs from an HTML home page, using the \Applet tag.  In Visual café, applets are built on applet containers.

The applet container extends from the panel container. Applets inherit the Panel’s flowlayout manager, but this can be changed from the applet property inspector window.  Applet objects support the following functionality:

n	Applet programs are run by another program

n	Applet objects support threads

n	Applet objects contain methods which manage sounds, pictures and URL addresses

n	Applet programs can write to files only if they are located on the host system of the managing home page. An applet can not write a file over a network.

n	An applet can not have menus, but a pop-up dialog box inside an applet can have menus.

To create an applet GUI interface in Visual Café, simply drag visual components from the Palette onto the forms designer window.  Use the interaction wizard to associate predefined events supported by calling components, with predefined behaviors supported by called components.

You can place panels inside an applet container, to more effectively organize applet display space.  You can place dialog containers into an applet container. You can not place frames or windows into an applet container.

Test your applet by clicking on ‘Project:Run to build and run the applet.  Example1 is an HTML file which calls your applet automatically.  You can edit ‘Example1’ to pass parameters if you need to.

Applets do not have a familiar main() method.  Instead, they conform to a calling protocol borrowed from the threads package. You do not have to call these methods yourself, but more complex applets may require you to override init, start, or stop.

n	init() initializes an applet.

n	start() runs an applet

n	stop() stops a running applet and saves its state, but does not destroy it.  The applet can be restarted.

n	Destroy()  stops a running applet if necessary, releases memory, sends messages and pops applet processes off the stack.

Note

To display an applet on a Web page, an HTML file containing a reference to your applet, is required to run the applet.  In HTML, an applet tag looks like:

<APPLET CODE="Applet1.class" WIDTH=100 HEIGHT=100></APPLET>

Usage

n	Threads are built into applets.  For simple applets, you do not need to consider how your applet will handle threads.

n	Vector provides you with the necessary html file you need to run your applet during development.  It is part of your applet project, called ‘Example1’.  It automatically tracks the name and size of your applet, and calls the applet when you run it.  You can manually edit the example1 file to pass input parameter values.

n	Applets support a popup dialog box, but some browsers will display an “untrusted Window” message in the border around the dialog box.

n	An applet inside a web page can not have menus, but a popup window built on a frame does support menus.


AboutDialog
AboutDialog container

  Properties   [image]  Events

Displays a dialog box containing information about your program.


Application

An Application is a stand-alone program written in Java, which you can launch with a mouseclick or from a command line.  Applications are not called from HTML code the way applets are. In Vector Café, applications are built using the Frame component as a container for widgets.

Applications and Applets


AttentionDialog
AttentionDialog container

  Properties   [image]  Events

Creates s message dialog in which you can display an informational or error message. AttentionDialog extends Dialog.

Usage


Button component

  Properties   [image]  Events

 Property [image]  Events

This component to displays a button which can have a label.  A button allows the user to begin, pause, or stop execution in a program.  When a button has the input focus it appears outlined to indicate to the user that this is an active object.  When the user clicks the button, it appears depressed to indicate that the mouse' action will be performed.

Usage

In Vector Café, you can add a button to your project by selecting the Button icon present on the palette, and dragging it to the Forms Designer window.  This also adds a button object to your project. You can reposition and resize the button as necessary.  Use the properties palette to add a Label component to the Button object.

You can also create a new button in code using the following syntax:

button1 = new java.awt.Button ( ) ;

button1 = new java.awt.Button ( String label ) ;

Part	Description

button1	The variable name used to identify the button in code.

label	An optional parameter that sets the text to display in the button.

Note

You can write code that gets executed when the user clicks a button by adding the code the button’s click event.


Canvas component

  Properties   [image]  Events

This component manages an empty rectangular area within your container where your program can draw images.  Canvasses can can trap input events from your user.

Usage

Use this syntax to create a new canvas:

canvas1 = new java.awt.Canvas ( ) ;

Canvas1 is the variable name used to identify the component in code.

Notes

•	An application must subclass the Canvas class.  You must override the paint method in order to create graphics on the canvas.

•	A canvas receives all mouse, keyboard, and focus events that occur while it is active.  You can override the gotFocus, lostFocus, keyDown, keyUp, mouseEnter, mouseExit, mouseMove, mouseDrag, mouseDown, and mouseUp methods in order to catch user events.


Checkbox component

  Properties   [image]  Events

Use this component to allow the user a make a true or false selection.  The user can toggle the state of the check box by clicking the component.

Usage

When you create a check box, you can optionally specify a label for the component, add the check box to a group, or set the state of the check box.  Create a new check box using the following syntax.

checkbox1 = new java.awt.Checkbox ( ) ;

checkbox1 = new java.awt.Checkbox ( String label ) ;

checkbox1 = new java.awt.Checkbox ( String label, CheckboxGroup group, boolean state ) ;

Part	Description

checkbox1	The variable name used to identify the check box in code.

label	The text to display in the button.

group	The component’s check box group.  Specify a valid name for a check box group, or null for no group.

state	The initial state of the check box: true indicates "checked"; false indicates "unchecked".


CheckboxGroup component

  Properties   [image]  Events

Associates a group of check boxes.  When a check box component is added to a checkbox group, it looks and behaves like a radio button.  Only one element in the group can be set to "on" at any time.  Clicking any component in the group turns it "on" and forces others in the group "off".

Usage

Create a new check box group using the following syntax:

group1 = new CheckboxGroup ( ) ;

Group1 is the variable name used to identify the check box group in code.

Notes

•	At design time, if you add a radio button to a form, Visual Café automatically creates a checkbox group for you.  If you remove the value from the Group property, the radio button will behave like a check box.

•	To add a checkbox to a checkbox group at run time, you need to call the add method for the checkbox.


CheckboxMenuItem component

  Properties   [image]  Events

Creates a check box that can be included in a menu.  Clicking the menu toggles its state from checked to unchecked or from unchecked to checked.

When a check box menu item is clicked, the AWT sends an action event to the component which contains the frame.  The event's target is the check box menu item, and its object is the string label of the check box.

Usage

To create a check box menu item with the specified label, use this syntax:

menuItem1 = new java.awt.CheckboxMenuItem ( String label ) ;

To add a check box menu item to an existing menu, call the menu component's add method:

Menu1.add ( new java.awt.CheckboxMenuItem ( String label ) ;

Part	Description

menuItem1	The variable name used to refer to the component in code.

label	The label for the check box menu item, or null for an unlabeled menu item.

menu1	The variable name of the menu component to which you are adding the menu item.

 Notes

•	On creation, a check box menu item is unchecked.  Use the setState method to check a menu item.

•	The Java language does not require you to create a variable to reference a menu item.  Instead, you can refer to the menu item by its label.


Choice component

  Properties   [image]  Events

Choice displays a choice box containing the currently selected label. Clicking on the choice box displays a popup menu of other possible choice box labels.  Choices are mutually exclusive (This component behaves just like a windows-standard drop-down list box.)

Usage

To create a new choice menu which has no items in it, use this syntax:

choice1 = new java.awt.Choice ( ) ;

Choice1 is the variable name you can use to refer to the component in code.

Notes

•	By default, the first item added to the choice menu becomes the selected item, until a different selection is made by the user or by calling one of the select methods.

•	In the Windows operating system, the choice component is the equivalent of a combo box.


Component class

  Properties   [image]  Events

Component is an abstract base class from which all Visual Components derive.  This class provides a protocol defining objects which will possess size and position, can be rendered onto the screen, and can receive events.  Component is an abstract base class and can not be instantiated.

Component subclasses the set of visual components present on the Visual Café palette. It also subclasses the container class, which in turn subclasses specialized containers supporting applets, pop up windows and applications.

To build a Java GUI, you instantiate a container object and all the component objects you will need.  Then you call that container object’s add method to place component objects into your container object.  In Vector, you perform this task by dragging an object from the palette over onto the forms designer window.

Component subclasses (button, label, list, etc.) are designed to be placed into container subclasses.  The Java awt package and Visual café supports the following containers:

n	Window is a blank container which contains no layout manager.

n	Frame derives from window.  It contains the borderlayout manager, and supports a title and menu bars.

n	Dialog and its subclasses are frames which can pop up and can be set to modal or nonmodal.  They prompt for user input.

n	Panel can be placed inside other containers including other panels, and provides a flowlayout manager.

n	Applet is a panel which can be run by another program, and supports multimedia features. Applets can not be nested.


Container class

  Properties   [image]  Events

A container is an object which can hold any number of objects of a given data type. In Java, the container class is an abstract base class, which provides a protocol defining objects which can display on the screen, and holding objects of the type component.

The Component class is an abstract base class which is subclassed to provide all the visual components you need to build either a Java GUI.  For example; subclasses include button, label, list, TextArea, TextField, checkbox, choice, canvas, and scrollbar.  Many of these components appear on the Vector palette.

The java awt package and Visual café support the following container objects:

n	Window is a blank container which contains no layout manager.

n	Frame derives from window.  It contains the borderlayout manager, and supports a title and menu bars.

n	Dialog and its subclasses are frames which can pop up and can be set to modal or nonmodal.  They prompt for user input.

n	Panel can be placed inside other containers including other panels, and provides a flowlayout manager.

n	Applet is a panel which can be run by another program, and supports multimedia features. Applets can not be nested.


Date
Date component

  Properties   [image]  Events

Not defined yet.


DateField
DateField component

  Properties   [image]  Events

Not defined yet.


DateSpinner
DateSpinner component

  Properties   [image]  Events

Not defined yet.


Dialog component
Dialog container

  Properties   [image]  Events

A dialog container supports a pop up window where the user can type a line of text.  Dialogs extend window components, and can receive pane components.  Dialog subclasses open or save file windows from the Windows file menu.

Dialogs are intended to be temporary windows. They present specific timely information to the user, or they allow the user to set options for the current operation.

Usage

To creates a dialog window, use this syntax:

dialog1 = new java.awt.Dialog ( Frame parent, boolean modal ) ;

dialog1 = new java.awt.Dialog ( Frame parent, String title, boolean modal ) ;

Part	Description

parent	The main application window from which the dialog can be shown.

modal	A boolean value indicating the window mode.

title	The text to display in the dialog title bar.

Settings

The settings for modal are:

value	description

true	The dialog box blocks input to other windows while it is visible dialog box grabs all input from the user.

false	The dialog box is modeless.  Other windows can be activated and used while the dialog is open.

Notes

•	The dialog window is modal which means it receives all mouse, keyboard, and focus events that occur while it is open.

•	The default layout for a dialog is BorderLayout.


Event class

Event is a platform-independent class that encapsulates user events from the local Graphical User Interface (GUI) platform.

[define the relationship between events and methods]

[explain how vector implements event data members in this class ]


FileDialog component

  Properties

Displays a modal dialog box from which the user can select a file.  The Visual Café object library contains two components, Open File Dialog and Save File Dialog, which extend the FileDialog component.

When a file dialog is displayed, the files shown are those in the current directory.

Usage

Use this syntax to create a file dialog box:

FileDialog ( Frame parent, String title ) ;

FileDialog ( Frame parent, String title, int mode ) ;

Part	Description

parent 	 The owner of the dialog.

title 	 The text to display in the dialog title.

mode 	 An expression that indicates whether to show an Open File dialog or a Save File dialog.  The possible values are described in Settings.

Settings

The mode argument must have either of these values:

Value	Description

LOAD	Indicates that the file dialog is finding a file to read.

SAVE	Indicates that the file dialog is finding a place to write a file.

Tip

This example demonstrates how to create and display a file dialog:

java.awt.FileDialog OpenFileDialog;
( new FileDialog ( this, "Open" ) ).show ( ) ;

The keyword this references the object that invokes the method.

Note

The file dialog window receives all mouse, keyboard, and focus events that occur while it is open.


Frame component
Frame container

  Properties   [image]  Events   [image]  Related Topics

A frame is a top-level container that supports a title bar, a menu bar, defaults to a BorderLayout manager property, and responds to events. It displays as a gray rectangle with a tile bar.  Unlike panels or dialogs, a frame can not itself be placed inside another component. When a frame is active, it receives all mouse, keyboard, and focus events that occur over it. Visual café uses the Frame component to support applications.

In Visual Café, a Frame is the container used to create a Java application GUI.  Create a frame by selecting New Project from the File menu, and selecting to create a new application project.  Visual café provides a frame for you, provides a main() method, and updates frame methods and and property and event defaults as necessary.

You can also drag a frame from the palette to the forms designer, or from the object library to the project window.  These techniques require you to provide a main() method and override other frame methods manually.

Usage

Frame Methods

To create an program that has a menu bar, you must create a frame container to which you can add a MenuBar component.  A menu bar cannot be added to any other type of container.


FTPClient
FTPClient component

  Properties   [image]  Events

Not defined yet.


FTPDialog
FTPDialog container

  Properties   [image]  Events

Not defined yet.


HorizontalSlider
HorizontalSlider component

Not defined yet.


ImageButton
ImageButton component

Not defined yet.


ImageList
ImageList component

Not defined yet.


ImageMap
ImageMap component

Not defined yet.


ImageSpinner
ImageSpinner component

Not defined yet.


Label component

  Properties   [image]  Events

Label adds a text string to a container.  An application or applet can change the label text string, but a user cannot edit it.

Button components also support the label component, but access a label as a property.  You can change the label string in a property inspector window for any component that supports the Label string.

Usage

When you create a label, you can optionally specify the text to appear in the label and the justification for the label text.  Use this syntax to create a new label:

label1 = new java.awt.Label ( ) ;

label1 = new java.awt.Label ( String label ) ;

label1 = new java.awt.Label ( String label, int alignment ) ;

Part	Description

label1	The variable name you can use to identify the component in code.

label	The text to display in the label.

alignment	A expression that specifies the alignment for the label text.  If no alignment is specified, the label is automatically left aligned.

Settings

The alignment value must be either Label.LEFT, Label.RIGHT, or Label.CENTER.

Value	Description

LEFT	(Default.)  Indicates that the label should be left justified.

CENTER	Indicates that the label should be centered.

RIGHT	Indicates that the label should be right justified.


List component

  Properties   [image]  Events

List displays a scrolling list of text items.  You can also set a list component to allow your user to select either one item or to select multiple items at once, from the property inspector window.  Upon selection, a list item toggles between selected and unselected.

Usage

To create a new List component, use this syntax:

list1 = new java.awt.List ( ) ;

list1 = new java.awt.List ( int rows, boolean numSelections ) ;

Creates a new scrolling list initialized to display the specified number of rows.  If the multipleSelections argument is true, then the user can select multiple items at a time from the list.  If it is false, only one item at a time can be selected.

Part	Description

list1	The variable name used to refer to the component in code.

rows	The number of items to display in the list.  If this parameter is omitted, the list height is zero, and therefore not visible.

numSelections
A boolean value which determines whether  the list allows multiple selections.

Settings

The settings for numSelections are:

Value	Description

true 	Multiple selections are allowed.

false	(Default.)  Only one item can be selected at a time.

Notes

•	You can add code to the list events to handle interaction from the user.

•	When a list item is selected, the select event is triggered.  When an item is deselected, the deselect event is triggered.  When the user double clicks an item in a list, the double-click event (or action event) is triggered.  The event's target is the scrolling list, and its object is the string label of the item selected or deselected.


Menu component

  Properties   [image]  Events

The menu component creates a pull-down menu in a menu bar.  A menu can optionally be a tear-off menu.  A tear-off menu can remain on the screen after the mouse button has been released. Frame components support menus.

Usage

You can create a new menu with a specified label.  Optionally, you can specify that the menu behave like a pop-up menu.  Create a menu using this syntax:

menu1 = new java.awt.Menu ( String label ) ;

menu1 = new java.awt.Menu ( String label, boolean tearOff ) ;

Part	Description

menu1	The variable name used to identify the component in code.

label	The text that displays in the menu on the menu bar.

tearOff	A setting that determines whether or not the menu is a tear-off menu.

Settings

The settings for tearOff are:

Value	Description

true	The menu can be torn off.  The menus remains on the screen after the mouse button has been released.

False	(Default.)  The menu cannot be torn off.

Note

•	Each item in a menu must belong to the MenuItem class.  This can be an instance of MenuItem, a submenu (an instance of Menu), or a check box (an instance of CheckboxMenuItem.

•	There is no event associated with clicking on a menu to pull down the menu.


MenuBar component

  Properties

Displays a platform-specific menu bar bound to a Frame.  In order to display a menu bar in an application, you need to add a MenuBar component to a Frame window.

Usage

To create a new menu bar, use this syntax:

mb = new java.awt.MenuBar ( ) ;

Mb is the variable name used to refer to the component in code.


MenuItem component

  Properties   [image]  Events

An item that appears in a menu.  All items in a menu must belong to MenuItem class or a subclass.

To add functionality to a menu item, you add code to the menu item’s click event.  The event’s target is the menu item, and its object is the string label of the menu item.  The Menu container overrides the click event and does not send any event to the frame until a subitem is selected.

Usage

To create a menu item with the specified label, use this syntax:

menuItem1 = new java.awt.MenuItem ( String label ) ;

Part	Description

menuItem1	The variable name used to refer to the component in code.

label	The label for the check box menu item, or null for an unlabeled menu item.

menu1	The variable name of the menu component to which you are adding the menu item.

Notes

•	The label "-" is reserved to mean a separator between menu items.  By default, all menu items except for separators are enabled.

•	The Java language does not require you to create a variable to reference a menu item.  Instead, you can refer to the menu item by its label.

Tip

To create a variable that represents the menu item, you need to create a new menu item and then add it to the menu.  The example below, shows how to add an Undo menu item to the Edit menu:

UndoMenu = new java.awt.MenuItem ( "&Undo" ) ;
editMenu.add ( UndoMenu ) ;


ModalDialog
ModalDialog container

  Properties   [image]  Events

A ModalDialog is a Dialog container that halts event processing until the user responds to components in the dialog window.


Observable
Observable component

  Properties   [image]  Events

Not defined yet.


Observer
Observer component

  Properties   [image]  Events

Not Defined yet.


OpenFileDialog
OpenFileDialog container

  Properties   [image]  Events

Displays the Operating System modal dialog box from which the user can open a file. OpenFileDialog extends Dialog.


SaveFileDialog
SaveFileDialog container

  Properties   [image]  Events

Displays the Operating System modal dialog box from which the user can save a file. SaveFileDialog extends Dialog.


Panel component
Panel container

  Properties   [image]  Events

Panel is a container which can hold visual components and other panels.  Panel provides a default FlowLayout manager, which can be reset from the property inspector window. Panels do not support menus.  Applet containers extend panels.

Panels are often used to organize space within an Applet or Frame container.

Usage

To create a new panel, use the following syntax:

Panel1= new java.awt.Panel ( ) ;

Panel1 is the variable name you can use in code to refer to the panel.

Note

Creates a new panel. The flow layout is the default layout for panels.


PasswordDialog
PasswordDialog container

  Properties   [image]  Events

Not defined yet.


Product
Product component

  Properties   [image]  Events

Not defined yet.


ProgressBar
ProgressBar component

  Properties   [image]  Events

Not defined yet.


RadioButton component

  Properties    [image]  Events

Radio buttons make an exclusive choice among a set of items.  In a group of radio buttons, only one can be selected at a time.  If you select a radio button, other radio buttons in the group are automatically deselected.

Usage

In the Java language, a radio button is identical to a check box except in its implementation. To create a radio button, create a check box and add it to a check box group.  Use this syntax to create a radio button:

radioButton1 = new java.awt.Checkbox (String label, Group1, false ) ;

Part	Description

radioButton1 	The variable name used in code to refer to the component.

label 	A string label for the check box, or null for no label

group 	A check box group, or null for no group

state 	The initial state of the check box: true indicates "on"; false indicates "off"

Note

To create a radio button, you must first have a check box group to which you add the radio button.  The example below shows the syntax required for creating Group1 a new CheckboxGroup component:

Group1 = new CheckboxGroup ( ) ;


RegExp
RegExp component

  Properties   [image]  Events

Not defined yet.


RegExpValidator
RegExpValidator component

  Properties   [image]  Events

Not defined yet.


ScrollBar
ScrollBar component

A scroll bar selects from a range of values. For example, if using a scrollbar to scroll through text, the width of the scroll thumb can represent the amount of visible text relative to the amount of text in the whole document.

In Vector Café, scrollbars come preattached to TextArea and List components.

Usage

Notes


SlideShow component

  Properties         [image]  Events   [image]  Methods

SlideShow displays a series of image files.  Each image in a slide show can have descriptive text associated with it.

Usage

Use this syntax to create a slide show:

slideShow1 = new symantec.itools.awt.SlideShow ( ) ;

SlideShow1 is the variable name you can use to reference the component in code.

Notes


SoundViewer
SoundViewer component

  Properties   [image]  Events

Not defined yet.


TextArea component

  Properties   [image]  Events

TextArea creates an editable multiline text box with two scroll bars. Use the property inspector window to change the editable property to read-only.  Text displays as you type on the keyboard.

TextArea extends from the TextComponent abstract class. Text area provides a methods interface which adds, deletes and selects text, but does not support text change.  You must write custom code to provide new edit functions.

In Visual Café, you add a TextArea component to a frame, panel or applet by dragging the TextArea icon from the palette to the forms designer window.  By default, TextArea behavior accepts keyboard input and displays that input in the display pane, but you can use the interaction wizard to change this default.

Usage

The following syntax is used to create a new text area:

text1 = new java.awt.TextArea ( ) ;

text1 = new java.awt.TextArea ( int cols ) ;

text1 = new java.awt.TextArea ( String text ) ;

text1 = new java.awt.TextArea ( String text, int cols ) ;

text1 = new java.awt.TextArea ( String text, int rows, int cols)

Part	Description

text1	A variable name which you use to reference the component in code.

text	The text to display in the text field.

cols	The width (in number of characters) that the text field can display and accept as input.

rows	The number of rows of text that the text area can display.

Notes

•	When the text area receives or loses the focus, the gotFocus or lostFocus event is triggered, respectively.

•	Typically, the user interface implements an external event (such as clicking a button) to trigger an action in the text area.


TextField component

  Properties   [image]  Events

TextField displays a single line of text. TextFields can either be editable or read-only.  By default, TextFields are editable.  Text displays when you press <CR>.  Textfield provides a password property which disguises user input when set to true.

TextField descends from the TextComponent class.

Usage

The following syntax is used to create a new text field:

text1 = new java.awt.TextField ( ) ;

text1 = new java.awt.TextField ( int cols ) ;

text1 = new java.awt.TextField ( String text ) ;

text1 = new java.awt.TextField ( String text, int cols ) ;

Part	Description

text1	A variable name for a Text Field which you use to reference the component in code.

text	The text to display in the text field.

cols	The width (in number of characters) that the text field can display and accept as input.

Note

To display multiple lines of text in a text box, use the TextArea component.


TextComponent
TextComponent component

  Properties   [image]  Events

TextComponent is an abstract base class that provides a call protocol to TextArea and TextField components. TextComponent extends the Component class.


TextFileViewer
TextFileViewer component

  Properties   [image]  Events

Not defined yet.


ThreeStateButton
ThreeStateButton component

  Properties   [image]  Events

Not defined yet.


TickerTape
TickerTape component

  Properties   [image]  Events

Not defined yet.


Time
Time component

  Properties   [image]  Events

Not defined yet.


TimeField
TimeField component

  Properties   [image]  Events

Not defined yet.


Timer
Timer component

  Properties   [image]  Events

Not defined yet.


TimeSpinner
TimeSpinner component

  Properties   [image]  Events

Not defined yet.


Toolbar
Toolbar component

  Properties   [image]  Events

Not defined yet.


Vertical ScrollBar and Horizontal Scrollbar components
Horizontal ScrollBar and Vertical Scrollbar components

  Properties   [image]  Events

A scroll bar lets you survey a range of values, and then select a value by positioning the scroll thumb graphically along the bar.  The thumb can be resized to represent the ratio of visible data to total available data.  For example, if using a scrollbar to scroll through text, the width of the scroll thumb can represent the amount of visible text relative to the amount of text in the whole document.

You can also use a scroll bar as an input device or indicator of speed or quantity, for example, to control the volume of an audio CD, or to reduce or enlarge the display of a graphic.

Scrollbars are added to a container automatically, whenever a TextArea or List component is added.

Usage

scrollbar1 = new java.awt.Scrollbar ( ) ;

scrollbar1 = new java.awt.Scrollbar ( int orientation ) ;

scrollbar1 = new java.awt.Scrollbar ( int orientation, int value, int visible, int minimum, int maximum ) ;

Part	Description

scrollbar1	The variable name used to reference the component in code.

orientation	An integer value indicating the orientation of the scroll bar.

value	The initial value of the scroll bar.  This parameter controls the starting location of the scroll thumb.  This number should be between the minimum and maximum values.

visible	the size represented by the bubble in the scroll bar.  The scroll bar uses this value when paging up or down by a page.

minimum	The minimum value of the scrollbar when the scroll thumb is in the bottom or rightmost position.

maximum	The maximum value of the scrollbar when the scroll thumb is in the top or leftmost position.

Settings

The possible settings for orientation are:

Setting 	Value	Description

HORIZONTAL	0 	Creates a horizontal scroll bar.

VERTICAL 	1	Creates a vertical scroll bar.

Notes

•	To change the orientation of a scroll bar, set the component's Orientation property to VERTICAL or HORIZONTAL.

•	To set the location of the scroll thumb in the scroll bar, set the scroll bar's Value property.  The Minimum and Maximum properties control the appropriate range for the position of the scroll thumb.


VRMLViewer component

  Properties   [image]  Events

Not defined yet.


URLButton
URLButton component

  Properties   [image]  Events

Not defined yet.


URLPannel
URLPanel component

  Properties   [image]  Events

Not defined yet.


Validator
Validator component

  Properties   [image]  Events

Not defined yet.


VerticalSlider
VerticalSlider component

  Properties   [image]  Events

Not defined yet.


Viewer
Viewer component

  Properties   [image]  Events

Not defined yet.


Window component
Window container

  Properties   [image]  Events

A window is a container supporting a default BorderLayout manager, and providing general window management methods to its subclasses.  Window does not support border or title properties or hold menu components.  Window and its subclasses can not be placed into other containers.

Window subclasses frame and dialog containers.

Notes

n	The AWT sends the window all mouse, keyboard, and focus events that occur while it is active.

n	Use the show method to make the window visible at run time.

Usage

To create a window in code, use the following syntax:

window1( Frame parent ) ;

Part	Description

window1	The variable name used to refer to the object in code.

parent 	The  that is the parent of the window.  A window requires a parent frame in order to be displayed.


No Help Available

Help is not currently available for this component.